ProcessWire Weekly #257

In the 257th issue of ProcessWire Weekly we'll walk you through the new features in ProcessWire 3.0.130, introduce two new third party modules, and showcase the elegant new website of the QFMA. Read on!

Welcome to the latest issue of ProcessWire Weekly! It's another sunny day around here, and hopefully there as well. Either way, be sure to take some time off and relax a bit during the weekend, whether that means going completely off the grid, or grabbing your favorite code editor and working on a side project or two :)

In this issue we'll cover the latest core updates (ProcessWire 3.0.130), introduce two brand new third party modules (File Info Textformatter from Robin Sallis, and RockModuleCreator from Bernhard Baumrock), and feature the new site of the Quebec Furniture Manufacturers Association – QFMA for short – as our latest site of the week.

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.130

This week we have a new core updates blog post from Ryan, in which he covers some of the key features found from our latest dev branch version, ProcessWire 3.0.130. Some of these features have already been briefly covered in our weekly updates – but even if you've already using them, you'll probably learn a thing or two from the examples and introductions provided in the blog post.

Below we've got a brief summary of each of the main topics covered in this week's blog post: the WireMail blacklist setting, the $cache->renderFile() method, and the $datetime->elapsedTimeStr() method.

New WireMail blacklist setting

Developed originally for the needs of the ProMailer module to properly accommodate certain privacy rules and legislation, the WireMail blacklist setting is defined with $config->wireMail('blacklist', [ ... ]), and accessed in code through the $mail->isBlacklistEmail() method. This feature provides a built-in way of preventing specific addresses from ever receiving a single message from the site, or – in the case of ProMailer – from ever subscribing to a newsletter.

Read more about the WireMail blacklist setting.

New $cache->renderFile() method

Newly added $cache->renderFile() method is a shortcut that basically does the same thing as a combination of $files->render(), $cache->get(), and $cache->save() by rendering any PHP file as a template file with all API variables, etc. and caching the output so that it doesn’t have to be re-rendered until the cache expires.

Read more about the $cache->renderFile() method.

New $datetime->elapsedTimeStr() method

In a nutshell the newly added $datetime->elapsedTimeStr() compares two date/time values provided as arguments, and returns the difference between them as a nicely formatted value, such as "2 days 4 hours 20 minutes". This is essentially an extended version of the pre-existing $datetime->relativeTimeStr() method, which returns the difference between a given timestamp and current time.

Read more about the $datetime->elapsedTimeStr() method.

For more details on the three methods mention here, as well as the latest status update regarding the issues repository cleanup project, be sure to checkout the latest blog post at Thanks!

New module: File Info Textformatter by Robin Sallis

File Info is a new module from Robin Sallis. This Textformatter module automatically adds defined extra details to links pointing to local Pagefiles. You can specify what you want it to add, and how/where you'd like it to add, via module settings – but, in the nutshell, the module either adds specific details as markup before, after, or within the link, or it can add those details as data-attributes for easy JavaScript access.

Image containing a text passage with file type and size – such as "PDF, 4.12 MB" – appended to local Pagefile links.

A sample text passage with file type and size appended to local Pagefile links.

You can pick and choose the file attributes you want to end up in your markup – basename, ext, filesize, filesizeStr, etc. – and manually define the markup string they appear in (if using the "add markup to links" option). The module also allows hooking into the method returning these values, in case you want to modify them programmatically, or perhaps add something that isn't there by default.

There are quite a few settings for this module, so be sure to check out the File Info support forum thread for more examples, instructions, and usage examples. Big thanks to Robin for sharing this module with us – really useful as always!

New module: RockModuleCreator by Bernhard Baumrock

RockModuleCreator is a brand new third party module by Bernhard Baumrock, and as the name suggests, this is a tool for module creators: by filling in a few attributes, you can create and install new versions of "module skeletons".

The way this module works is that you create a dummy module with some predefined placeholders (such as #author# and #date#), type values for those placeholders and a link to your module (a GitHub repository, for an example) into the RockModuleCreator settings screen, and it'll download your dummy module, replace those placeholders with real values, and install your new module.

Screen capture of the RockModuleCreator interface with text fields for name, author, and module skeleton URL, and an icon picker field for module icon.
The RockModuleCreator interface currently provides text fields for name, author, and module skeleton URL, and an icon picker field for module icon.

At its current stage RockModuleCreator is a nice tool if you find yourself often creating new modules that share features with your earlier modules, but as Bernhard mentions in the support forum thread announcing the module, he'd be happy to incorporate new features via PRs – so this is really just the starting point. Additionally, since the module accepts an URL for the skeleton parameter, publicly available skeleton modules alone could make it very powerful tool in the long run.

This module is a nice addition to our modules directory, and we're particularly thrilled to see where it'll go from here – so big thanks to Bernhard for sharing his work with us!

Site of the week: Quebec Furniture Manufacturers Association

Our latest site of the week belongs to the Quebec Furniture Manufacturers Association. Founded in 1942, their mission is to actively contribute to the growth of Quebec’s furniture industry and oversee its promotion and development in Canada, the United States, and worldwide.

The website of the QFMA was developed by Spiria. Responsive and elegantly styled, the site consists of multiple content types, and even the regular content pages provide plenty of variations thanks to a structure based on content blocks. One particularly interesting feature on this site is the members directory, which has a slick, AJAX powered filtering feature, lazy-loaded images, and a page of its own for each member organization.

The QFMA site is multi-lingual, consisting of English and French language sections, and the front-end – built using the Bootstrap front-end framework – is sprinkled with these little animations and transitions that do a great job at calling focus to the action that is currently occurring, or the element that is currently active.

Overall this site is beautiful, there's plenty of quality content here, and performance is also top-notch. Big thanks to the folks at Spiria for sharing this project with us, and congratulations to the Quebec Furniture Manufacturers Association for their new, ProcessWire powered website!

Stay tuned for our next issue

That's it for the 257th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 20th of April. 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