Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/24/2015 in all areas

  1. It's always as a project gets big you'll have to take care. No matter what CMS. In case of images: a. you can now in 2.6 delete variations for a image right in the backend. But that doesn't work for batch processing a whole site's images. b. you can write a script to delete all variations through API, but that as soon as there's 1000's of pages involved you have to take care of memory, script time etc. Bit this if you own ListerPro (which I recommend all PW users should buy anyway) you can use and build an custom action that batches all your pages (or the ones you filtered) to remove variations. It's built with scalability in mind so it scales for millions of pages (just would take a very long time). c. you can also use the API when using $page->image->removeVariations() to delete and force new generation of variations. Then use a template var to toggle that globally in your template. Usually a custom $config var would be best as it allows also modules to read it. This works fine when building a site and you want to experiment to get the best options. Maybe not always suited but something like: $config->forceNewVariation = true; The always use a code like this where you generate thumbs or sizes. $img = $page->image; if($config->forceNewVariations) $img->removeVariations(); $img = $img->size(100, 100, $options); Of course this doesn't work well if you're live and have 1000 of pages. As you'd have to view all pages again to trigger new creation WHILE the setting is true. Just a few ideas.
    3 points
  2. Maybe this module with a custom "class" field added to each image? http://www.kf-interactive.com/blog/adding-custom-fields-for-images-in-processwire/
    2 points
  3. One problem is your specified "icons" property doesn't match the name of your toolbar button. From this tutorial, the relevant quote is: Another problem is that in the toolbar config, you need to put the name of the button, not the name of the plugin. From checking an official plugin ("Source Dialog"), I see they went with "Sourcedialog" for the button name (and thus "sourcedialog" for the icons property). So you could change your button name from "Loop Video" to "Loopvideo" and that would fix it (since your icons property would now be the lowercase version of that). Don't forget to also change the button name in the toolbar group config just in case, since I'm not sure if it's case-sensitive. Also, after making these changes, remember that your browser will still probably have the old version cached.
    1 point
  4. Maybe there's some new settings in core that would handle that if the setting quality changes it will force a new generation (which would be desired anyway) Maybe Horst knows as he worked on that one. I think the new naming convention includes quality, which would make that work.
    1 point
  5. 1 point
  6. A small google search will tell you that they are
    1 point
  7. Really nice and clean skin. It is definitly lighter then the default default skin. One small note: There is an quotation mark missing in the module instructions. I think most of the ProcessWire-Users figure this out by themself, but maybe you could fix it with your next update. CKEDITOR.editorConfig = function( config ) { config.skin = lightwire,/site/modules/EditorSkinLightwire/skins/lightwire/"; };
    1 point
  8. What errors you get? I'd suggest to generate a .zip file of the whole installation. Download it, reupload and unzip it on the new server. Then you need to modify the database credentials in the config.
    1 point
  9. I implemented the SystemNotifications module on my front end, but only on the user account settings page for now to test things out..At the moment it seems to work quiet nice $notices = $user->notifications; then for example $avatarErrorMsg = $notices->error("Your error message"); $avatarErrorMsg->expires = 30; // or however you like, doesn't even need to self expire $notices->save(); // while writing this I'm not exactly sure if necessary foreach($notices as $n) { if($n->is("warning")) $messageClass = 'warning'; if($n->is("error")) $messageClass = 'error'; if($n->is("message")) $messageClass = 'success'; $content .= "<div class='alert alert-$messageClass closable'>$n->title <i class='fa fa-close'></i></div>"; }
    1 point
  10. I can't recommend that module enough.
    1 point
  11. On a side note: Working with PW for more than 2 years and only now making the first forum post/question. This must be a testament to PW's ease of use, power and great docs!
    1 point
  12. @Rjay, `data_exact` is just the name given to that index, in other words the index 'Keyname'. I'm no expert but hope the following clarifies this:
    1 point
  13. I think I have it sorted. if($page->prev->id) {echo "<p class='next'><a href='{$page->prev->url}'>prev</a></p>";} if($page->next->id) {echo "<p class='prev'><a href='{$page->next->url}'>next</a></p>";}
    1 point
×
×
  • Create New...