ProcessWire Weekly #403

In the 403rd issue of ProcessWire Weekly we'll cover the latest core updates, introduce a brand new third party module Textformatter RockHeadlineIDs, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly! In this week's issue we'll cover the latest news and updates for the ProcessWire core, and also share some news directly from Ryan regarding an upcoming Pro module called FormAutoSave. There are also some news regarding a new master release, so stay tuned for that as well.

In other news we've got a brand new third party module to check out — Textformatter RockHeadlineIDs, developed by Bernhard Baumrock — and also a downright gorgeous site of the week, developed by ID Studio Web Agency for the Foodsteps platform.

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 and an update on upcoming FormAutoSaver module

In this week's update, posted via the support forum, Ryan briefly covers the updates made to the core within the past week, and also provides a status update for the FormAutoSave module he's been working on.

New Sanitizer methods for handling entities in arrays

The core updates for this week resolve 8 issues reported via GitHub, and also add two new Sanitizer methods, $sanitizer->entitiesA() and $sanitizer->entitiesA1(), for entity encoding arrays and other non-string values. As is explained in code comments, these are similar to the existing $sanitizer->entities() method, with following differences:

  • Array values that are strings are encoded recursively to any depth and array is returned.
  • Associative array keys (strings) are entity encoded, integer keys are left as-is.
  • Objects that implement __toString() are converted to string and entity encoded.
  • Objects that do not implement __toString() are converted to a class name.
  • If given an int, float, bool, array or string, that is also the type returned.

The difference between $sanitizer->entitiesA() and $sanitizer->entitiesA1() is simply that the latter will always prevent double encoding entities.

FormAutosave module status update, and other news this week

As for the FormAutoSave module, according to Ryan it will likely be available (as a part of the ProDevTools package) maybe as soon as next week. The main features provided by this module include automatically remembering the state for partially filled forms for users, as well as providing the admins a way to view such partial form submissions.

Last but not least, Ryan also mentioned in his post that we're getting pretty close to a new stable release for the core. Our previous stable version was released late August last year, which means that the dev branch is now some five to six months ahead, and that means there's indeed a lot of new stuff waiting to be merged.

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

New module: Textformatter RockHeadlineIDs

A brand new third party module developed by Bernhard Baumrock, RockHeadlineIDs is a textformatter that automatically applies IDs to headlines (H1-H6) within text content. This ID is based on the content of the headline, with transliteration rules applied, and the module also checks that the generated IDs are unique.

Here's an example from the module's directory entry for RockHeadlineIDs:

<!-- input -->
<h1>This is my headline</h1>

<-- output -->
<h1 id='this-is-my-headline'>This is my headline</h1>

If you want to customize the way IDs are created, the module provides a hookable method for exactly that purpose:

$wire->addHookAfter("TextformatterRockHeadlineIDs::getID", function($event) {
  $event->return .= "-hooked";
});

You can download and install this module via the built-in module installer in Admin, or clone or download it from the RockHeadlineIDs GitHub repository. In case you have any questions or require support, visit the RockHeadlineIDs support forum thread.

Big thanks to Bernhard for sharing this module with us!

Site of the week: Foodsteps

Our latest site of the week belongs to Foodsteps, which is an award-winning platform that tracks the environmental footprint of food from farm to fork.

Foodsteps was founded by Anya Doherty while she was researching sustainable food systems at the University of Cambridge. The goal of the platform is to make it easy and accessible for any food business to measure, reduce, and communicate their environmental impact.

The website of Foodsteps was built by the London, UK based ID Studio Web Agency. The site features a nice design with plenty of white space and well-thought-out typography. The overall design looks awesome, and seems fitting for the brand it represents. As for content, the site provides an introduction to the Foodsteps platform, the team working on it, the backstory for the project, and a blog section.

Behind the scenes this site is based on the Bootstrap front-end framework, with some additional help from various third party JavaScript tools, such as the Animate on Scroll animation library. The back-end of the site is obviously powered by ProcessWire, but other than that there's not much we can tell from the outside.

Big thanks to the folks at ID Studio Web Agency for sharing this project with us, and our congratulations and best wishes in their endeavors to the client, Foodsteps. Foodsteps seems like a great project in itself, so we're definitely happy to feature them here!

Stay tuned for our next issue

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