ProcessWire Weekly #453

In the 453rd issue of ProcessWire Weekly we'll cover a brand-new third party module called RockColorPicker, check out the latest core updates, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly. In this week's issue we're going to kick things off by taking a closer look at a new third party ProcessWire module called RockColorPicker, before diving into the latest weekly update from Ryan and the core updates applied since last week's stable release.

Our latest site of the week is that of the German non-profit association Musical-Fabrik. This is a very interesting project in so many ways, and one that we're able to check out in a lot of detail thanks to the source code being made publicly viewable by the developer behind the site, Sebastian Schendel.

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!

Weekly update from Ryan and some minor core updates

The latest weekly update from Ryan is mostly about the launch of a new stable release last week, which has so far been pretty smooth sailing. There have been no new major issues reported since then, and updates have been going smoothly. In case you were holding off the update just to see if everything goes well — it sure did :)

If you haven't yet upgraded I'd encourage you to. Last week's post covered a lot of what's new, in case you haven't seen it yet. Also be sure to check out the ProcessWire Weekly coverage of this new version.

— Ryan

As for this week's core updates, available via the dev branch in GitHub, there have been a few minor ones since last week:

  • Fix for the "add new field" screen, where the "usage" fieldset was erroneously visible even before the field existed, and just contained string "value".
  • Fix for an issue where proportional thumbnails were not displaying properly in the admin under specific circumstances.
  • An update for Repeater field JavaScript code, co-authored by Bernhard Baumrock, refactoring it to use data-name attribute instead of parsing field name from ID.
  • HTML Purifier was updated to 4.15.0, among other things resolving certain PHP 8.1 and 8.2 compatibility issues.

That's all for our core updates section this week. We'll be back with more updates next week, but in the meantime be sure to also check out the weekly update from Ryan. Thanks!

New module: RockColorPicker

RockColorPicker is a brand-new third party ProcessWire module created by Bernhard Baumrock. As the name suggests, this module is primarily a color picker, but there's a very interesting twist as well: in addition to selecting plain colors, the module also supports selecting custom CSS rulesets, as well as custom HTML blocks.

A screenshot of the RockColorPicker input in action, courtesy of module author Bernhard Baumrock. In this example we have various plain color options, a CSS based gradient, as well as a custom HTML element.

For non-required fields you can select and unselect colors in the admin UI, and the UI also works for keyboard navigation. RockColorPicker is a pretty simple module, which is in part due to there being no admin UI for the color options whatsoever. Instead, selectable options are defined by hooking into RockColorPicker::colors:

$wire->addHookBefore("RockColorPicker::colors", function (HookEvent $event) {

    // define options available for "site_bgcolor" field:
    $event->object->setColors('site_bgcolor', [
        'blue' => ['#acefee', __('blue')],
        'yellow' => ['#ffe36c', __('yellow')],
        'rose' => ['#ffc5df', __('rose')],
        'green' => ['#b5ffb2', __('green')],
        'violet' => ['#d5bfff', __('violet')],
    ]);
});

Though this approach may not appeal to all, it is a much simpler route to be sure, and for many cases being able to define available options in code is more a benefit than a drawback. At the same time the programmatic approach provides us with an easy way to translate all values, and many other interesting possibilities.

This module is available via the ProcessWire modules directory, so if you'd like to test it out, you can install it via the built-in modules manager in admin. Alternatively you can clone or download the source code from the RockColorPicker GitHub repository.

Big thanks to Bernhard for creating this module and sharing it with us!

Site of the week: Musical-Fabrik

Our latest site of the week belongs to Musical-Fabrik e. V. — a non-profit association from Rheda-Wiedenbrück, Germany.

Musical-Fabrik promotes the development of musical projects, both conceptually and financially, culminating in the creation of a stage mature musical. The association was founded in 2012, and all their contributors — of whom there are up to 200 — are volunteers. Not only performers and musicians, but people of all ages and many different talents working together (both on and behind the stage) to create a complete production and shape and participate in the cultural life in Rheda-Wiedenbrück.

The Musical-Fabrik website is beautifully designed and enjoyable to browse, featuring dedicated pages for their productions, details about the association, and recent news. What's also interesting is that there's a lot going on behind the scenes here, and this is one of those rare cases where we get to really dive into this part of the project hands-on, thanks to a detailed case story by the developer Sebastian Schendel, as well as the site's source code being made available via a public GitHub repository.

This site has been through various iterations over the years, starting out as a simple WordPress blog, moving on to the Joomla CMS, back again to WordPress, and finally to ProcessWire. Several publicly available and quite popular ProcessWire modules have also been created along with the site, used by many developers in their own projects.

To summarize some key points of the current version, the front-end of the site was built using (a customized version of) the Bootstrap front-end framework, while the back-end is a combination of the Twack module for reusable components, and AppApi for an API for the site's content. According to the case story, Sebastian has also been working on a separate mobile application for the project.

Big thanks to Sebastian for sharing so many interesting details about this projects, and our best wishes to Musical-Fabric e. V. association in their future endeavors — keep up the great work!

Stay tuned for our next issue

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