Popular Content

Showing content with the highest reputation since 02/16/2019 in all areas

  1. 11 points
    This week we take a look at what’s in ProcessWire 3.0.126 which focuses largely on resolving issue reports, but also includes a handy new $page->if() method— https://processwire.com/blog/posts/pw-3.0.126/
  2. 10 points
    A simple module to enable easy navigation between the public and the admin side of the site. After installation a green bar will appear to the upper side of the screen, containing a few navigation elements and displaying the PW version number. Heavily inspired by @apeisa's great AdminBar (Thanks!). I needed a bit simpler tool for my projects and as a result, this was made. Available on GitHub .
  3. 8 points
    I just wanted to share what I've just discovered after looking at Dragan's "CMS evaluation / checklist / usability (only in german for now)" article, even if I can't read german currently. https://animejs.com https://github.com/juliangarnier/anime
  4. 6 points
    Relying on .htaccess is not really uncommon for php cms's out there. Some are more minimal on utilising apache, processwire is probably more on the "take what we can get"-side. Having php serve everything – especially static assets – is just not performant enough in any way. That's the reason for needing to rely on the webserver in front of php in the first place. The reason for apache specifically is because of .htaccess. Other webservers are usually only statically configurable, which is a deal-breaker for any shared-hoster, where a (global) webserver cannot be restarted whenever a single user needs to change his configuration. So if you only support one webserver, it better be apache.
  5. 6 points
    Here is another progress report for development (early state) of my GroupMailer module: The dashboard and the message lister are nearly finished. Behind the scenes I created a custom field which holds all MessageMeta data. This special field can be attached to each template you like and will immediately make all corresponding pages a GroupMailer message. This allows to maintain the extreme flexibility of ProcessWire. More to come ...
  6. 6 points
    Using .htaccess is efficient. You could, in theory, handle (nearly) everything in PHP, but this would add serious overhead, both memory and speed wise. Others have adapted the rules for NGINX, a few like me use IIS with URL Rewrite to power PW, but in all cases, it makes sense to filter and rewrite requests in the web server itself. The topic of supporting more platforms than just Apache out of the box has been brought up a few times already here in the forums. Ryan himself is not opposed to it, but he lacks the time to develop and test the rule sets, and he is of course wary of including anything that hasn't been well tested or that might end up without active support (any changes he makes for .htaccess need to be quickly adapted for other platforms). So I guess it would need a team of knowledgeable volunteers who develop the rules, adapt the installer script, test everything well and provide quick support before he considers integration into the PW project.
  7. 5 points
    Okay I get your point. I made a 30 lines CSS Only switcher that should work with other theme than UiKit : https://codepen.io/flydev/pen/QYYZVL
  8. 5 points
    Version 0.5.0 fixes two issues, please update: Fix wrong url in the <link rel="alternate" hreflang="x-default"> meta tag. Fix date formatting for the lastmod property in the XML sitemap. Cheers
  9. 5 points
    @Robin S - I haven't ignored your request - it will be in the next version. Speaking of the next version, I have been looking at the poll from @teppo's PW Weekly and wondering what you guys would think about Tracy dropping support for PHP < 7.1 ? The new core Tracy 3.0-dev version requires PHP version 7.1 or newer and looking at the changes since the 2.5 version we are currently using, it won't be practical to support two versions of the core like I have done previously. So, the question is, can I make 7.1 a requirement for the new version? Not sure how to really get your feedback on this, but maybe a "like" means your OK with it, or a "sad" if you're not happy either sticking with the current version of this module (to maintain 5.x support), or otherwise don't want to lose 5.x support just yet. The new Tracy core comes with much faster rendering of dumped objects with a lot of depth, so we might be able to increase the default and big dump options significantly. There have also been improvements to live dumping that I still need to experiment with, but both sound very useful to have so I would like to upgrade. Thanks for your thoughts.
  10. 4 points
    A module helping you to manage SEO related tasks like a boss! Automatically generates and maintains a XML sitemap from your pages. Includes a Fieldtype and Inputfield to manage sitemap settings and meta data for pages (title, description, opengraph, twitter etc.) Multi language support for the sitemap and meta data. Configure default values for meta data on template level and let pages inherit or overwrite them individually. Map existing fields to meta data, reducing the need to duplicate content. Check out the README on GitHub for more details, including usage instructions. The module is currently released as alpha and needs testing! Please report any issues on GitHub or in this forum thread, if you find time to give it a try Cheers
  11. 4 points
    Visual Page Selector version 006 (released (18/02/2019) Happy to announce that the latest release of Visual Page Selector is now available for Download/Purchase. Thanks to suggestions by @Macrura, this version includes a number of improvements one of which will require clients to relearn one thing (sorry). Changelog Ajax vs Manual Save: You can now choose whether pages added to inputfield should be immediately saved to the pagefield (via Ajax) [the default behaviour] versus have them added in a sort of "pending state". If the latter, pages will be added to the inputfield (for visual purposes) but will not be saved to the pagefield until the page you are editing is manually saved. In the modal, visually, the pages are presented as if they are in the field (i.e. similar to pages saved in the field). In the inputfield, a pending page behaves like other pages saved in the field; they can be reordered, edited, etc. This feature has several advantages including the fact that changes can be made to the page without immediately being reflected in the frontend. Please note that reloading the page being edited without saving will discard pending pages! The setting is in the Input Tab (Modal Settings) when editing the field. Trash Icon: VPS Inputfield (Thumbs View) now behaves like a PW image field in relation to deleting pages in the page field. To delete an image from a PW image field, the process simply involves marking an image for deletion by clicking on its trash icon and saving the page. Previously, VPS (Thumbs View) has required two steps (in multi-page fields); first to mark an image for deletion by clicking on its trash icon and finally clicking on the remove icon (x). In single page fields, there was no icon altogether. It required clicking on the remove icon (x). Hence, these similar actions behaved differently from each other and from PW image fields (which VPS in Thumbs View seeks to emulate and enhance). With this update, VPS now behaves similar to PW image fields across the board. To remove pages from a pagefield using VPS, simply click on their trash icons and save the page. We have removed the remove icon (x). Unfortunately clients will have to be re-taught about this change but I think the benefits outweigh the inconvenience. Modal Lister View: We've improved the visibility of pages selected for adding to a VPS inputfield. The light grey background did not provide enough contrast. We've gone for a light red (pink?).
  12. 4 points
    See the post below. You can prefix the actual visible date value with a hidden sortable value (e.g. yyyy-mm-dd). Example code here. Follow the $dateSorter variable. The span with class="date-sorter" is hidden in the module's CSS file. The value in the span is the prefix. Sorting will be done based on it.
  13. 3 points
    Hello for all, ConfigurationForm fieldtype module is one my experiment from 2016. Main target to build this module was to store multiple setup and configuration values in just 1 field and avoid to use 1 db table to store just single "number of items on page", or another db table to store "layout type" etc. Thanks to JSON formatted storage this module can help you to reduce number of PW native fields in project, save DB space, and reduce number of queries at front-end. Install and setup: Download (at the bottom ), unzip and install like any other PW module (site/modules/...). Create some filed using this type of field (ConfigurationForm Fieldtype) Go to field setup Input tab and drag some subfields to container area (demo). Set "Name" and other params for subfields Save and place field to templates ("Action tab") How to use it: In my case, I use it to store setup and configurations values, but also for contact details, small content blocks... (eg. "widgets"). Basic usage example: ConfigForm fieldtype "setup" has subfields: "limit", type select, option values: 5, 10, 15, 20 "sort", type select, option values: "-date", "date", "-sort", "sort" // get page children (items) $limit = isset($page->setup->limit) ? $page->setup->limit : 10; $sort = isset($page->setup->sort) ? $page->setup->sort : '-sort'; $items = $page->children("limit=$limit, sort=$sort"); Screenshots: Notes: Provide option to search inside subfields Provide multilanguage inputs for text and textarea field types Provide option for different field layout per-template basis Do not place/use field type "Button" or "File input" because it won't works. Please read README file for more details and examples Module use JSON format to store values. Text and textarea field types are multilanguage compatible, but please note that main target for this module was to store setup values and small content blocks and save DB space. Search part inside JSON is still a relatively new in MySQL (>=5.77) and that's on you how and for what to use this module. Thanks: Initial point for this fieldtype was jQuery plugin FormBuiled and thanks to Kevin Chappel for this plugin. In field type "link" I use javascript part from @marcostoll module and thanks to him for that part. Download: FieldtypeConfigForm.zip Edit: 14. August 2018. please delete/uninstall previously downloaded zip Regards.
  14. 3 points
    So, yes, this method unzips all nested files. My use case, for anyone who may need: <? // hook into tutorial upload and unzip file into destination wire()->addHookAfter("InputfieldFile::processInputFile", function(HookEvent $event) { $pagefile = $event->argumentsByName('pagefile'); // limit to a specific field {file_tutorial}, restricted to zip uploads if($pagefile->field->name != 'file_tutorial') return; // full disk path to your custom uploads directory $tutorialsBaseDirectory = $this->wire('config')->paths->assets . 'tutorials/'; // extend path with custom directory nam corresponding to page id $pageIdDirectory = $tutorialsBaseDirectory . $pagefile->page->id . "/"; // extend path with custom directory name from the filenme without extention $tutorialDirectory = $pageIdDirectory . $pagefile->basename($ext = false); // use ProcessWire's $files API // @see: http://processwire.com/api/ref/files/ $files = $this->wire('files'); // Remove directory and its files after ensuring $pathname is somewhere within /site/assets/ $files->rmdir($pageIdDirectory, true, [ 'limitPath' => $tutorialsBaseDirectory ]); // make tutorials id directory correspondig to ressources id if($files->mkdir($tutorialDirectory, true)) { // directory created: /site/assets/tutorials/id/filenameWithoutExtension } // get zipfile and destination and unzip $zip = $pagefile->filename; $dst = $tutorialDirectory; $items = $files->unzip($zip, $dst); }); Adopted from The script takes an uploaded zip and unzips it into the destination folder. As it has an index.html I can point a link to it.
  15. 3 points
    Probably worth pointing out that currently the "safe thing to do" is going with 7.1 or 7.2: 7.0 is no longer officially supported, so it's no longer receiving security updates, and even 7.1 will stop receiving (security) updates near the end of this year. 7.3 is currently the "cutting edge" version, so you might want to wait a while before going there. In terms of security there are exceptions, such as Ubuntu, where distro maintainers have been backporting security-related fixes from new versions to old ones – but if you're already on 7.0, I would assume that it's not the one that you got with your operating system, and as such is likely that you're already using a (potentially) insecure version.
  16. 3 points
    Any updates on this? I've been occupied lately, but spotted some details too. A seperate repo would be awesome. I've referenced the Ember kind-of-way before (including their awesome RFC process), but I also like their approach to a volunteer based website on github. Also checkout the README with other public repositories too. All community / PR merge request based.
  17. 3 points
    I'm biased, and probably not the biggest user of Tracy either, but in my opinion support for PHP < 7.1 should be safe to drop by now. For the folks stuck with those versions, current Tracy version still works – right? That's what I've been doing with my modules and code recently: splitting a separate "legacy" branch for those who need it, but only focusing new development for current PHP versions. And by "current" I mean the officially supported ones.
  18. 3 points
    It looks like there are many settings that can be defined for InputfieldSelector, but only initValue can be set via the FieldtypeSelector field config. For the others you have to use a hook. The previewColumns setting controls the columns shown: $wire->addHookBefore('InputfieldSelector::render', function(HookEvent $event) { /* @var InputfieldSelector $inputfield */ $inputfield = $event->object; // Only for the FieldtypeSelector field of the given name if($inputfield->hasField != 'test_selector') return; // Define the columns you want $inputfield->previewColumns = ['name', 'template', 'modified']; });
  19. 3 points
    Not sure where to post this, I'm hesitant to file it as a GitHub issue. I noticed that in the database's image fields, the fractional part of focus values are a bit overkill: e.g. {"focus":{"top":93.400000000000005684341886080801486968994140625,"left":49.39999999999999857891452847979962825775146484375,"zoom":0}} Don't know that it matters much, but hey, the super-extra-hyper-10x-Retina displays aren't on sale yet, so...
  20. 3 points
    With the the relatively new ProField FieldtypeFieldsetGroup it should be a quick job to add this to all templates.
  21. 2 points
    Usual way is something like this in your module (adjust to suit your needs): /** * @return array */ static public function getDefaultConfig() { return array( "my-module-config-1" => "", "my-module-config-2" => "", "my-module-config-3" => "my default setting for this config field", ); } /** * Populate default configuration (will be overwritten after constructor with user's own configuration) * */ public function ___construct() { foreach(self::getDefaultConfig() as $key => $value) { $this->$key = $value; } } /** * @param array $data * @return InputfieldWrapper */ public function getModuleConfigInputfields(array $data) { $inputfields = new InputfieldWrapper(); $defaults = self::getDefaultConfig(); $data = array_merge($defaults, $data); $f = $this->modules->get('InputfieldText'); $f->name = 'my-module-config-1'; $f->label = __('MyModule key 1'); $f->value = $data['my-module-config-1']; $f->collapsed = 5 ; // collapsedPopulated $inputfields->add($f); $f = $this->modules->get('InputfieldText'); $f->name = 'my-module-config-2'; $f->label = __('MyModule Config key 2'); $f->collapsed = 5 ; // collapsedPopulated $f->value = $data['my-module-config-2']; $inputfields->add($f); $f = $this->modules->get('InputfieldText'); $f->name = 'my-module-config-3'; $f->label = __('MyModule config key 3'); $f->collapsed = 5 ; // collapsedPopulated $f->value = $data['my-module-config-3']; $inputfields->add($f); return $inputfields; } Then you can call it in your template like: <?php $myModule = $modules->get('MyModule'); ?> <p><?=$myModule->my-module-config-1?></p> Best way to learn is to look into other popular PW custom modules
  22. 2 points
    Ok, Thanks berhard, I'll give that a try. I think a blank profile might be more straightforward at this point. Then I'll see if I can figure out how to plug it into the other setup. Cheers, Gavin
  23. 2 points
    Hello gbball and welcome to the forum, WebGL is a browser technology, so everything happens on the client side and has nothing to do with ProcessWire. You just have to make sure your library gets loaded on your page. The docs of three.js show you how you do that: https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene This sounds good to me Did you do (DO, not READ ) the hello worlds tutorial? https://processwire.com/docs/tutorials/hello-worlds/ This might help you to understand the basics of PW and might make it easier to do the right things when going through the three.js docs.
  24. 2 points
    thanks for the advice, I submitted it as an issue.
  25. 2 points
    Hey @adrian. Just wondering if this thread might've served it's purpose already, or do we still want to keep it pinned to the Modules/Plugins area? I'd say that it's been long enough, but it's your call
  • From Twitter

    • New post: This week we take a look at what’s in ProcessWire 3.0.126 which focuses largely on resolving issue reports, but also includes a handy new Page if() method— processwire.com/blog/posts/pw-…
      15 February 2019
    • New post: ProcessWire 3.0.125 has several useful new Sanitizer methods & options, plus new ways to access them directly from the Input API variable. This makes handling user input even easier than before. Plus updates to our i18n functions & API docs— processwire.com/blog/posts/pw-…
      25 January 2019
    • New post: In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124— processwire.com/blog/posts/pw-…
      11 January 2019