In the 280th issue of ProcessWire Weekly we're going to cover the new core features introduced by ProcessWire 3.0.141, introduce ModulesManager 2, and take a closer look at a really interesting new site of the week. Read on!
Welcome to the latest issue of ProcessWire Weekly – hope you folks have had a great week so far. This time our highlights include a walk through of all the new core features introduced in ProcessWire 3.0.141 – and there's plenty in there – and a dive into a really promising new community project called ModulesManager 2.
Our latest site of the week belongs to a biennial transformational festival that will be held at Portugal in 2020: the Boom Festival. Their website is a media-rich experience, so it's no surprise that a number of steps were taken to make it perform well. Anyway, we'll talk more about that in just a bit.
Thanks to all of our readers for being here with us again, and as always, any feedback is most welcome – please don't hesitate to drop us a line if there's anything in your mind you'd like to share with us. Enjoy our latest issue and have a great weekend!
Latest core updates: ProcessWire 3.0.141, now with built-in PlatinumElvenKing™ cookie technology!
In this week's update at the processwire.com blog Ryan has some pretty interesting news regarding the core: extended configurability for various ProcessWire paths, new hookable method for templates, and some all-new cookie-related features that really take the cookie support in ProcessWire to the next level.
... oh, and just in case you're wondering what the eff that heading was all about, let's just say that this week's post contains a few odd — and oddly entertaining — twists. Refrigerator enthusiast or not, prepare to be entertained.
New cookie-related features
As you're no doubt aware, ProcessWire has always provided access to cookies (the data containing kind, not the crunchy and sweet ones we all love) via $input->cookie
. As of 3.0.141 ProcessWire also provides an API method for creating/storing new cookies:
// These two are equal in function:
$input->cookie->foo = 'bar';
$input->cookie->set('foo', 'bar');
There's a bit more than that to cookies – you know, expiration dates and domains and such – for which the core provides a couple of solutions: $config->cookieOptions
for defining default values for various cookie related options, in addition to which you can also provide an array of custom options when setting a specific cookie.
As Ryan mentions in his post, the intention here was to add a feature that is every bit as intuitive and simple to use as the good old jQuery Cookie plugin. Now getting and setting cookies are equally simple when you're working with ProcessWire.
Read more about ProcessWire's new cookie features »
Hookable $templates->fileModified() method
Behind the scenes ProcessWire keeps track of when template files were last modified. Usually you don't need to be aware of this at all, but if you're a power user or module developer working with a feature that would benefit from this information, you'll be happy to hear that you can now get that by hooking into Templates::fileModified()
:
$templates->addHook('fileModified', function(HookEvent $event) {
$template = $event->arguments(0);
$event->log->message("Detected change to $template->filename");
});
Read more about the Templates::fileModified() method »
Customizable ProcessWire system paths and URLs
Last but probably not least, 3.0.141 extends ProcessWire's configurability in regards to paths and URLs. In a nutshell this means that the disk locations and URLs of many of ProcessWire's directories (cache, logs, files, tmp, and templates) are now configurable via a set of new methods added to $config
:
$config->setLocation('name', $dir); // changes both path and URL to $dir
$config->setPath('name', $path); // changes just path, leaves URL as-is
$config->setUrl('name', $url); // changes just URL, leaves path as-is
This feature comes with some fascinating new possibilities, such as an ability to serve a different set of templates based on some run-time variable – such as user role or name – or further separate the site's public-facing resources from code and other non-public data... and probably a number of other ideas we can't even imagine yet.
That being said, there are also important considerations you really need to be aware before modifying the defaults. One of these is the default .htaccess protection, which may no longer work as expected once the directory structure has been modified.
Read more about configurable system paths and URLs »
That's it for our core updates this week. Be sure to check out the full blog post by Ryan for more details, and if you have any feedback, feel free to leave a comment to the blog post as well. Thanks!
Community project highlight: introducing ModulesManager 2
This week we wanted to highlight a certain community project that is currently being developed by Jens Martsch: ModulesManager 2 is a tool that provides an easy to use interface to download, update, install, uninstall, and configure modules.
This project is intended as an alternative to the current built-in modules manager in the core. Though still very much a work in progress, it already provides features that make exploring the modules directory easier — and arguably more intuitive.
Some highlights:
- There's an intuitive autocomplete search feature, and real-time filtering options for finding just the right modules. Currently module names are searched, but there are plans to include descriptions in the search as well.
- Once found, modules are displayed with a really nice card layout, complete with various bits of relevant information pulled from the modules directory.
- Installing or uninstalling modules is streamlined: actions requiring confirmation or additional steps (such as configuring an installed module) happen in a panel, eliminating the need to completely refresh the view.
- The design and layout are based on the Uikit framework, which means that ModulesManager 2 fits really neatly into the Uikit Admin Theme.
Check out the screencast to get a better idea of what we're talking about:
For those curious about the implementation, behind the scenes ModulesManager 2 makes use of Vue.js for two-way data binding, and the source data is fetched from the endpoint provided by the modules directory and then cached locally. There's a lengthy todo list still waiting to be implemented, but a work-in-progress version of MM2 should be available for testing really soon.
Stay tuned for more updates regarding ModulesManager 2 – we'll be sure to cover this project in more detail once it's available for a proper test. In the meantime: big thanks to Jens for his hard work on this very interesting project!
Site of the week: BOOM Festival 2020
Our latest site of the week is the state of the art website for upcoming 2020 edition of the BOOM Festival in Portugal. Developed by BOOM Festival in Portugal
First impression of this site is definitely certain level of awe: you're greeted with this really elaborate and visually striking animation, and overall the site feels more like a "multi-media presentation" than typical website. There's "boom radio" you can use to play music while on the site – the radio actually continues to play while you browse the site – and the site is filled to the brim with all sorts of media, animation, and effects.
If you're interested in the Boom Festival – self-described as a "truly psychedelic global gathering of music, arts, culture & hands-on sustainability" – or just want to get a glimpse of some fun and positively unique web design, definitely check this site out.
Live sets, concerts, DJs, bands and solo acts: performances explode through the seams of the festival and the music doesn’t stop. It breaks barriers and unites; and at times, it can feel as if it's all we’ve really got in this crazy world of chaos. In music we trust!
– excerpt from the Boom Vision
Some of the technical highlights on this site include the use of WebP images (a format natively supported by recent ProcessWire dev versions that typically provides a notable improvement over older formats like JPG or PNG), lazy loaded resources, and a separate CloudFront powered domain for serving static assets such as MP4 video files. It's clear that a lot of effort was put into making this site fast, and considering the media-rich experience that it is, this makes a lot of sense to us.
Big thanks to RETINAFUNK Media for sharing this project with us, and all the best to the BOOM Festival of 2020 – it sounds like you're going to have one amazing event!
Stay tuned for our next issue
That's all for the 280th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 28st of September. As always, ProcessWire newsletter subscribers will get our updates a few days later.
Thanks for staying with us, once again. Hope you've had a great and productive week, and don't forget to check out the ProcessWire forums for more interesting topics. Until next week, happy hacking with ProcessWire!
Post a comment