ProcessWire Weekly #318

In the 318th issue of ProcessWire Weekly we're going to check out a couple of new third party modules, introduce ProcessWire 3.0.160, and more. Read on!

Welcome tot he latest issue of ProcessWire Weekly. This time we're going to introduce the latest dev version of ProcessWire — 3.0.160 — and check out a couple of brand new third party modules: Repeater Depth Helper and ImageBlurhash.

We've also got a new site of the week to highlight, and we'd like to give a shout-out to a new article from Nifty Solutions regarding ProcessWire, and specifically the reasons one might choose ProcessWire over... well, the competition. Probably won't need to drop any names here, I'm sure y'all know what I'm talking about.

Anyway, more about that in just a bit — first up we've got some core update news!

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!

ProcessWire 3.0.160 preview and new versions of the TfaTotp and TfaEmail modules

This week's update from Ryan was posted to the support forum and focuses on the 2FA module updates that were initially introduced in last week's core updates blog post. If you haven't had the chance to check last week's post out yet, we'd like to suggest that you do it now — there's plenty of valuable information regarding secure authentication in there, so you really don't want to miss it.

So, what's new in ProcessWire 3.0.160?

As always you can find a more detailed write-up from Ryan's update, but here's a quick summary of what's new this week:

  • The core now supports enforcing two-factor authentication. This is a new option that can be found from the ProcessLogin module settings, and becomes available once you've installed the TfaEmail module.
  • TfaEmail version 2 has been released. In addition to supporting the enforced 2FA option, this version also allows you to specify the WireMail module you want it to use (if you have more than one of those installed, that is.)
  • TfaTotp version 4 was also released, and contains various improvements, such as a new feature for QR code generation, and an updated version of the bundled TwoFactorAuth library.

Note that while both TfaEmail and TfaTotp are indeed going to be merged into the core, this step is still a work in progress. If you'd like to give 2FA a go right now, there's no harm in installing the modules manually — as you probably already knew ProcessWire detects duplicate modules automatically, and lets you choose which one is active.

Stay tuned for even more core updates!

In his post Ryan also drops a little teaser regarding next week's updates: two brand new selector operators are going to land in the core by next week, and — according to Ryan — these will be particularly useful to anyone building text search engines. More details will likely follow next week, so stay tuned.

That's all for our core updates section this week. For more details be sure to check out the weekly update from Ryan at the support forum. Thanks!

A new article by Nifty Solutions explains why anything is possible with ProcessWire

There are many reasons why one might choose ProcessWire over other options. Nifty Solutions picked their top-3, and decided to cover those reasons in a series of blog posts.

Some of you folks might know Nifty Solutions as the company co-owned by the admin of the ProcessWire support forum, Peter Burlingham. Nifty Solutions is also a creative agency based in the UK, and they provide various digital services, including designing and developing websites and online applications.

Now, the reason we're talking about Nifty Solutions in this weekly issue is that their CMS of choice happens to be none other than ProcessWire — which, as they explain on their website and in an ongoing series of blog posts, is a carefully considered decision that ultimately boils down to three key points: security, flexibility, and usability.

You can read more about all this from the Nifty Solutions blog, which as of this writing contains two posts that touch this topic, with the third one (on usability) planned to be released in July:

Big thanks to the folks at Nifty Solutions for their ongoing support of the ProcessWire project. It's always great to find a company where decisions — particularly those with long term effect on their clients — are based on more than just what's easy to sell in the short term. Truly inspiring!

Do you know a company that uses ProcessWire and would like to share their story with us? Let us know — we'd be thrilled to feature more interesting teams, as well as their reasons to focus on ProcessWire, in our future issues.

New module: Repeater Depth Helper

First of the two new third party modules we're going to introduce in this issue is called Repeater Depth Helper, and it was developed by ever so productive Robin Sallis. What this module does is a two-part process:

  • First of all it enforces certain rules for repeaters with the "Item depth" option enabled, basically making sure that the depth starts from zero, and the depth of each subsequent item is at most one greater than that of the previous item.
  • It adds a new method RepeaterPageArray::getDepthStructure() that returns an array that contains the ID of each item in the Repeater Page Array, as well as an array of children (or null if none) for that specific item.
An example of the return value of RepeaterPageArray::getDepthStructure(). Each key is an ID, and items with children contain nested arrays, while items with no children contain nothing (null).

The original intention behind this module was to make Repeater "page builders" easier to develop, but the potential for this module actually goes quite further than just that. Be sure to check out the Repeater Depth Helper support forum thread for a little code sample utilizing the return value to get a better idea of what's possible.

Big thanks to Robin Sallis for sharing another useful module with us — an interesting idea, and the implementation is top-notch as always!

New module: ImageBlurhash

Second third party module for this week's issue is ImageBlurhash, a module developed by the folks at Blue Tomato. If you're not yet familiar with the concept of BlurHash, it's a mechanism for turning an image into a blurred version that still roughly resembles the source image — basically a very light-weight and quick-to-load placeholder.

The API provided by this module makes the blurhash feature really easy to use:

// The encoded BlurHash as a string, or false if it doesn't exist:
echo $page->image_field->blurhash;

// Output an image with a specific size of blurhash (either a base64 encoded
// PNG data URI, or a transparent GIF if no blurhash found):
echo '<img src="' . $page->image_field->getBlurhashDataUri(500, 300) . '"'
   . ' alt="" data-lazy="' . $page->image_field->size(500, 300) . '" />';

Note that this module will only generate a blurhash for image fields with the "Generate Blurhash Strings" option enabled via field settings. The module also comes bundled with a couple of helper CLI scripts: regenerateImages.php regenerates blurhash strings for all applicable images, while generateEmptyImages.php automatically generates blurhashes for all images that don't yet have one.

Big thanks to Markus of Blue Tomato for sharing this project with us — amazing work, and a very interesting idea indeed!

Site of the week: The Power Supply Shop

Our latest site of the week is called The Power Supply Shop. What makes it kind of a rare beast among all of our sites of the week so far is the e-commerce focus: by combining the strengths of ProcessWire and SnipCart, this UK based web shop provides a formidable array of power supplies for their customers worldwide.

One might describe the design of The Power Supply Shop website as "friendly": there are plenty of round shapes and everything just has that certain "comfy" feel to it. The GUI is not over-the-top, but there's plenty of detail in here — animations, as well as transitions and fun little effects such as the one you get when you focus on the main search input — and just overall the whole experience feels intentional and planned.

In terms of content this site has more than 120.000 products and variations — which is a lot, obviously — and pulls data several times a day from a separate MS SQL database. Behind the scenes the site makes use of ProcessWire's built-in WireCache caching feature, as well as a bunch of third party modules: ProCache, FormBuilder, Tracy Debugger, Tasker, and the DataSet import modules.

For more details, be sure to check out the showcase forum thread for The Power Supply Shop. Big thanks to Outward for sharing this project with us, and our congratulations to the Power Supply Shop for their amazing website. Great job, everyone!

Stay tuned for our next issue

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