Jump to content

dragan

Members
  • Posts

    2,011
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. Moving to another city today, lack of sleep, and thinking about stuff I might have forgot to pack: that's a strange weekend Oh, and artists trying to tear apart a brandnew website in the last minute, just before going live (that was built in record time): Fun! (not)
  2. I guess using Hanna Code and page ids would be the easiest. Using the search or looking up the content tree in one browser tab (get the id on hover), and the edit screen in a second one. MODX uses something similar: <a href="[~7~]">click here to go to document id 7</a>. It takes then just 1-2 lines of API code to convert it to a regular link. This approach would probably also be hassle-free when building a multilang PW site. Because when adding a link via WYSIWYG, you have to manually replace de/ueber-uns/ -> en/about-us. (unless I missed a workaround or new module / hook).
  3. Probably one of these libs / tuts can help re: deeplinking http://www.asual.com/jquery/address/ http://www.codemag.com/Article/1301091
  4. @Joss I forgot the name / URL of the method, but there was some JS library a while back (mainly due to Flash sites), that you could use to deep-link certain sections of your one-page site, with #anchor links. I was never a big fan of that trend, but if you can somehow generate a unique URL for each "page" / section, more power to you. Guess SEO-wise it can help - but to me, it somehow still feels like a "hack". Thanks! I'm old, but not quite that old
  5. It would be easy to split the textarea inputfield that's already there into "each line = separate language alt text" in your template(s). The rest would simply be conventions, i.e. make sure the client / editor really fills in all the text.
  6. I would take a look at things that are already out there, i.e. Mahara + Moodle. re: forum integration The major headache is syncing CMS to forum users. There are various "bridge" scripts out there, but they're all somewhat problematic. You never know what update X will change. But as long as the forum script is also open-source, a CMS integration is def. doable. edit: just stumbled over this http://www.invisionpower.com/support/guides/_/advanced-and-developers/application/application-extension-membersyncphp-r185 - I guess that could be a good start / building block.
  7. Very nice. Also, I didn't expect any other font than Helvetica Neue for a company / site named Helveting
  8. If you do a rough calculation (4 msg / second) for one year, you'll end up with over 3 million entries. Although I'm sure PW could handle that fine, I guess you'll be better off with a custom DB-table. otoh, creating PW pages with the excellent API is a breeze. Depending on the whole workflow, I'd consider some type of cronjob for archiving inactive auctions (set a flag in the custom DB, or use a checkbox inputfield in PW). Also, ask yourself what exactly do you need to do with all these messages. Perhaps a bit more background infos about the site functionality would be good.
  9. Yes, absolutely. What I just noticed: After hitting "save", normally I get redirected to /page/edit/?id=1018&s=1 This doesn't happen anymore. it's always just /page/edit/?id=1018# Why isn't the &s=1 not appended anymore? o_O
  10. Here are the headers from Firefox in the attachment. Does anybody see something strange? o_O
  11. The only thing that Firefox debugger finds, is: Error: TypeError: e is null /wire/modules/Jquery/JqueryCore/JqueryCore.js?v=183 line: 2
  12. I have noticed a strange thing ever since upgrading to or installing 2.3.8. Whenever I edit a page and press "save", the page doesn't reload. It just shows a blank screen with the current URL, e.g. http://www.mydomain.com/pw/admin/page/edit/?id=1061 The edits ARE saved - that's not the problem. Just the blank screen. I have to manually get back or hit reload / F5 in the browser. I've tried switching from Chrome to Firefox. I've also tried switching to the old admin theme - no luck. Clearing browser cache: same thing. To clarify: This happens when editing / creating / saving pages, and e.g. using the batcher module. Editing fields and templates behaves normally. Is this a known bug? I noticed this behaviour now in three sites, all running on 2.3.8.
  13. @Xeto: Using custom image-sizes (cropping / resizing) is very well documented and easy. Adding a lightbox / fancybox / shadowbox CSS + JS in your header, and adding the necessary rel=[foo] in your templates is easy too. Tags / archive / blog functionality: There's an excellent Blog Profile you can install. Also, there's a date archiver module already out there.
  14. @houseofdeadleg: Thanks for the info. Unfortunately, I didn't know about this. Will try to implement that asap.
  15. Bienvenu au forum icietla There are probably many workarounds for that scenario. You could create a checkbox inputfield, and check the value in your head or init.php template. If that checkbox is checked, you could do a redirect to the other language. if($page->redirectLang == 1) { $user->language = "en"; $session->redirect($page->url); } (untested)
  16. Thanks. I installed it now on a live server, but now I get still no infos at all, and in addition: Error: Call to a member function render() on a non-object (line 19 of /home/foo/public_html/site/templates/map.php) line 19 = echo $map->render($page, 'map'); // straight from the Module docs / example Also, in page edit mode, I still see "Geocode OFF" below the map - or "N/A". To add to all these oddities, the address never gets saved. When I re-edit the page, the address is gone. PW 2.3.8, Google Chrome, PHP 5.4.12
  17. I've installed this module for the first time locally, on PW 2.3.8 dev. The backend looks fine - except a notice at the bottom: Geocode OFF Anybody knows why? In my map template, I have just this: // head: <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script> // body: <?php echo $page->marker->address . '<hr>'; // outputs the address you entered echo $page->marker->lat . '<hr>'; // outputs the latitude echo $page->marker->lng . '<hr>'; // outputs the longitude $map = $modules->get('MarkupGoogleMap'); echo $map->render($page, 'map'); ?> What I actually see in the rendered frontend, is just this: <div id='mgmap1' class='MarkupGoogleMap' style='width: 100%; height: 300px;'></div><script type='text/javascript'>if(typeof google === 'undefined' || typeof google.maps === 'undefined') { alert('MarkupGoogleMap Error: Please add the maps.googleapis.com script in your document head.'); } else { var mgmap1 = new MarkupGoogleMap(); mgmap1.setOption('zoom', 18); mgmap1.setOption('mapTypeId', google.maps.MapTypeId.HYBRID); mgmap1.init('mgmap1', 0.000000, 0.000000); mgmap1.addMarker(0.000000, 0.000000, '/path/to/google-map-test/', 'Google Map Test', ''); }</script> No map is shown, no address or lat/lng are shown either. Is it necessary to add your own GM API key somewhere? Is it known to simply not work from localhost / 127.0.0.1? Or do I have to change the GM JS URL or add parameters? (v3)? Thanks in advance for tips and pointers.
  18. A small PW-based site for a Swiss photographer has just left the door: http://www.nicolasaebi.ch/ Nothing too fancy here. A couple of gallery-pages, using mainly isotope and fancybox. Responsive. Minimal.
  19. Oh, that's absolutely lovely. I searched the PW forum and Google, but that module didn't show up in results. Thanks!
  20. Did you try http://www.php.net/manual/en/phardata.extractto.php ? On my host, this seems to be enabled, i.e. I see it listed when I do phpinfo(). Seems to be pretty easy to use. Example I found somewhere: // decompress from gz $p = new PharData('files.tar.gz'); $p->decompress(); // creates files.tar // unarchive from the tar $phar = new PharData('files.tar'); $phar->extractTo('new_dir');
  21. OK, so I found the dev $log API already here: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/WireLog.php And I found out to use $user = $this->wire('user')->name; The 14 useless empty lines were caused by stupidly naming the function the same as the module itself, d'oh. The only remaining question now is to list fine-grained infos about the edited fields (mainly text, but file- and edits in image-fields would be useful too - at least new uploads and deletes). I don't need "old content before save" and "new content after save" - just knowing which fields were edited would be awesome.
  22. I'd like to write a simple module: Creating a log that lists page-edits, i.e. which user has edited which page and when. Write each new entry to a new line in a text file in site/assets/logs/edits.txt. Simple enough. Following the Helloworld.module example, I came up with this: public function init() { // add a hook after the $pages->save, to issue a notice every time a page is saved $this->pages->addHookAfter('save', $this, 'logEdits'); } public function logEdits($event) { $page = $event->arguments[0]; $logFile = '/home/foobar/public_html/site/assets/logs/edits.txt'; $fh = fopen($logFile, 'a'); $now = date("Y.m.d H:i:s"); $stringData = "{$page->path}\t{$page->url}\t{$page->title}\t$now\n"; fwrite($fh, $stringData); fclose($fh); } It works - somewhat. I'm confused though why I get 15 lines on each page save(). I get 10 empty lines, then /de/medienecho/ /de/medienecho/ Medienecho 2013.12.08 15:17:23 then another four empty lines. Should I be using something else than $this->pages->addHookAfter('save') ? Does anybody know why I get 14 empty lines instead of just the right one, once? o_O Also, if I wanted to a) list the username and b) list each edited field how would I go about that? I saw on the roadmap for 2.4 that a new $log API will be available, but I'm curious if I could write something now already without it. The var $user->name is always empty. How do I access that from inside a module function? Sorry, but I'm totally new to writing modules and using hooks...
  23. Not sure I understand. You can simply re-upload a new site/config.php file to the server, from a fresh PW installation, i.e. edit lines 219-223: $config->dbHost = 'localhost'; $config->dbName = 'foo'; $config->dbUser = 'bar'; $config->dbPass = 'asdfasdfasdf'; $config->dbPort = '3306';
  24. Have a look at the $config stuff here: http://cheatsheet.processwire.com/ (e.g. $config->httpHost)
×
×
  • Create New...