ProcessWire Weekly #277

In the 277th issue of ProcessWire Weekly we'll walk you through ProcessWire 3.0.139, introduce two brand new third party modules, and take a closer look at a beautiful new site of the week. Read on!

In this week's issue we've got plenty of interesting stuff to talk about: there's the latest dev release, 3.0.139, which contains some really neat new stuff – and we've also got two new third party modules we're quite thrilled about: U2F Two Factor Authentication, and RockFinder2.

Our latest site of the week is quite something as well. It's a showcase belonging to Saso Studio, which is a creative agency based in Amsterdam, Netherlands. Their website is an interesting combination of ProcessWire and Ember.js – 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.139

The latest post at the processwire.com blog covers two new features, both of which are already available in the dev branch of ProcessWire: new "toggle" inputfield, and an improved field selection interface for template editor.

Toggle inputfield

Toggle is a new type of field that works kind of like our existing checkbox field in that it allows you to create inputfields where the user can choose the "state" from predefined options: enabled/disabled, on/off, yes/now, etc. There are a few things that set toggle apart from a simple checkbox, though:

  • While a checkbox is always a basic on/off type selection, toggle is displayed as a set of radio buttons, where labels are used to make it obvious what each choice means specifically. As such, it is by nature a bit more descriptive.
  • Having more features than a simple checkbox, the toggle inputfield allows you to choose from a set of predefined labels, or alternatively add your own labels. You also have a few options regarding how the options are displayed.
  • Toggle supports a third value, which can, for an example, be used to represent an "iffy" situation where the answer may not be obvious, or perhaps it's not quite as simple as a boolean true or false: [ ] Yes [ ] No [x] Not sure.

The first thing to hit the core is the toggle inputfield, which means that it's currently an option for modules such as FormBuilder, and any inputs added with code. A separate toggle fieldtype is on the works, and will hopefully be available as soon as next week. This will allow you to add toggle fields directly to templates as well.

Field selection improvements

The field selection interface in template editor – the one that is based on AsmSelect – also received some rather interesting updates this week:

  • Carets are automatically added to denote fields that are part of a multi-field column: a down pointing caret identifies the field that starts the row, and a up pointing caret identifies the field that closes the row.
  • In the case that the widths of the fields belonging to a multi-field column don't add up to 100% – which they preferably should – one of the carets will be red.
  • Probably the biggest update here is the ability to adjust field widths by dragging: after clicking the field width, you can then adjust the width by dragging up/down or left/right.
  • Finally, changes you've made to column widths or field order are automatically saved with asynchronous requests in the background.

The dragging interface in particular may be a bit difficult to describe in words alone, so Ryan has prepared a screencast video demonstrating this feature. Please keep in mind, though, that this feature is still very much experimental.

That's all for our core updates section – you can read more about the updates we've summarised here from Ryan's post at the processwire.com blog. Feel free to drop a comment there if you have any feedback to share. Thanks!

New module: U2F Two Factor Authentication

U2F Two Factor Authentication is a brand new third party module that provides 2-factor authentication for ProcessWire using FIDO U2F compatible devices.

U2F – short for Universal 2nd Factor – is a standard originally developed by Google and Yubico, and currently hosted by the FIDO Alliance. The U2F standard covers physical devices that provide the ability to authenticate to different types of services. These devices are typically distributed as USB dongles with a single push button.

Developed by Adam Blunt, the u2F Two Factor Authentication module makes use of the Yubico U2F PHP libary, and the U2F JavaScript API for Chrome support. While the module is currently considered beta, and it's literally only existed for a few days, it's already fully functional, so feel free to give it a try.

Getting started with this module is really easy: install it, enable 2-factor authentication via your user profile, and add your keys. Next time you log in you'll be asked to confirm the login using one of your registered U2F keys. That's pretty much all there is to it.

This module can be installed via the module installer in ProcessWire Admin. In case you prefer manual installation, you can grab the source code from the Processwire-TfaU2F GitHub repository. Big thanks to Adam for sharing this project with us!

New module: RockFinder2

RockFinder2 was announced earlier this week, and it's the latest module from Bernhard Baumrock. This module is the successor to RockFinder version 1, which you've probably heard of before – essentially it's a query builder developed on top of ProcessWire, used for writing efficient queries without the need to rely on raw SQL.

Compared to its predecessor, RockFinder v1, this second version is quite similar on the surface, but contains numerous changes behind the scenes. It also makes use of a new syntax, which is based on the built-in, Query related features found from ProcessWire:

$rf = new RockFinder2();
$rf->find("id>2, limit=5");
$rf->addColumns([
'title',
'created',
]);
var_dump($rf->query);

This module comes with a UI for managing Finders, which you can use in code simply by requesting them based on their names: $rf->getByName('finder_name'). This is quite an extensive module, but luckily Bernhard has provided us with a screencast in which he demonstrates some of ithe many features provided by RockFinder2:

This module is currently in alpha stage, but feel free to read more about it at the RockFinder2 support forum thread. If you'd like to give it a try as well, you can grab the source code from the RockFinder2 GitHub repository.

Thanks to Bernhard for sharing this project with us!

Site of the week: Saso Studio

Our latest site of the week belongs to Saso Studio. Founded in 2015 by graphic designer and art director Sanne Sofia, Saso is a creative studio that works with all sorts of clients, creating unique graphics, videos, logo designs, etc.

The website of Saso Studio is a really neat showcase, and probably one of the most "atypical" web sites we've featured so far: even though the site is actually quite simple, it has a lot of stuff going on, plenty of animation – starting from the logo – and each project page is a little different from the previous one. All in all this is a really cool showcase, and a fantastic fit a creative studio like Saso.

This site was skillfully crafted by eelke.net, and it's powered by ProcessWire – obviously – and Ember.js. There are no third party modules visible on the front-end of the site, though that's not particularly surprising on a largely JavaScript powered website.

Big thanks to Saso Studio and eelke.net for sharing this project with us, and trusting ProcessWire as your backend platform. Amazing work – we're thrilled to have this site featured here, and included in the ProcessWire sites directory!

Stay tuned for our next issue

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