ProcessWire Weekly #268

In the 268th issue of ProcessWire Weekly we're going to cover the latest core updates (ProcessWire 3.0.134), take a closer look at Autocomplete Module Class Name, and introduce ProcessWire Composer Installer. Read on!

Welcome to the 268th issue of ProcessWire Weekly! This time we're going to take a quick look at the latest core updates (ProcessWire 3.0.134), and introduce a third party module called Autocomplete Module Class Name from Robin Sallis.

In other news we're also going to provide a quick walk-through of a new project called ProcessWire Composer Installers, which is a custom installer for ProcessWire modules and site profiles, and should be of interest for those ProcessWire developers who are interested in integrating Composer into their workflow, or have already done that.

Last week we mentioned that there would be news regarding the Weekly website. Long story short: this site is going to be rebuilt, basically starting from scratch. A new host – which should provide a nice performance boost – is already set up, and we'll no doubt cover related topics in our future issue. If you'd like to take part in the process, feel free to send us suggestions or ideas for the new site. At this point anything goes, really :)

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

During the past week Ryan has been working primarily on existing issue reports, and ProcessWire version 3.0.134 – current state of the dev branch at GitHub – contains around 25 commits and fixes 18+ issues.

Most of the changes this week are pretty small, and thus unlikely to have a major impact on a lot of users. Here's a brief summary:

  • various UI related fixes and improvements (admin),
  • a fix for creating new field based on an existing fieldset,
  • resetting create and modify dates correctly when a page is cloned,
  • a fix for the WireHttp class where cURL headers were set inproperly,
  • a fix to avoid ImageInspector attempting to read Exif data from unsupported files,
  • a fix for Repeaters where the "depth" value wasn't being stored correctly,
  • and some selector engine tweaks and improvements.

One small but likely useful addition this week were new "text" and "html" properties in the core InputfieldButton class, providing support for setting the button contents and value independently. While the core itself doesn't make use of this – button values are not actually used, so they can be the same as the visible text – this may come in handy for other use cases, such as third party modules using native buttons for some custom feature.

In case you're interested in the specifics, you can check out the commit log from the past week. Thanks!

New module: Autocomplete Module Class Name

Autocomplete Module Class Name is a new module from Robin Sallis. This is a helper module for admin use, providing class name autocomplete suggestions for the "Add Module From Directory" and "Add Module From URL" fields at new Modules > New page.

Autocomplete Module Class Name module screencast by Robin Sallis.

Autocomplete list for the "Add Module From Directory" input can be fetched automatically from the modules directory, or you can provide a custom list (if you only want to suggest a specific subset of available modules). The "Add Module From URL" field suggestion list is always provided as a custom list: ModuleName > https://ModuleURL.

The module makes use of the Awesomplete autocomplete widget for the suggestions. The module provides an optional fuzzy search feature where the characters just need to exist in the autocomplete suggestion and occur after preceding matches, and you can also provide any custom settings for the Awesomplete widget.

Big thanks to Robin for sharing this module with us – it is a really useful addition to the admin!

Installing ProcessWire modules and site profiles with Composer: ProcessWire Composer Installer

Installing ProcessWire modules with Composer is nothing new: it has been possible for quite a while now thanks to the work of Hari KT, the author of the hari/pw-module project. For a module to be installable with Composer in ProcessWire it only needs to define aforementioned project as one of its dependencies, and that's just about it. While this works fine for most use cases, there are a couple of catches:

  • It doesn't work for site profiles, i.e. you cannot set up a new site profile using Composer.
  • You need to install modules from the ProcessWire root directory, so you cannot install site directory specific modules.

ProcessWire Composer Installer resolves both shortcomings, and also provides some additional features for customising the directory structure used for a specific module or site profile. Otherwise it's fully compatible with the old syntax, so the steps required for module authors are exactly the same, and switching between these two projects only requires a small modification in the composer.json file bundled with the module.

You can read more about this project from the ProcessWire Composer Installer GitHub repository, but the primary reasons you (as a module or site profile author) might consider this would be...

  1. By defining wireframe-framework/processwire-composer-installer as a dependency for your project you allow users to choose whether to install it via the ProcessWire root directory or a /site/ directory. In other words you can let developers decide if they want to add modules as dependencies for the whole project, or a specific site.
  2. You'll also make it possible to bundle module dependencies with site profiles without forcing users of the site profile to manually add dependencies after installing the site profile. This could be a really nice improvement in itself.
  3. If you want to make your site profile installable via Composer, you just need to add this project as a dependency for it, and declare the type of the site profile as pw-site-profile. Obviously site profiles can't be upgraded with Composer (that's not really how they work), but they can be added to a project with ease!

If you're a module or site profile author and would like to give ProcessWire Composer Installer a try, you can add it as a dependency to your project by adding it manually to the composer.json file or running the composer require command. In case you have questions, check the README for the project, and if still unsure feel free to post your question as an issue to the GitHub repository!

Site of the week: Victus Soul

Our latest site of the week belongs to Victus Soul, a provider of boxing and running inspired group exercise classes based on London, UK. Basically what Victus Soul provides are two programs to get you into shape: HIIT & BOX, and HIIT & RUN. HIIT stands for high-intensity interval training – a familiar concept from recent functional training trend – and BOX and RUN obviously stand for boxing and running, from which the company draws inspiration for its training programs.

The Victus Soul website was designed and developed by Internet Dreams Studio, and the site has been integrated with the "industry-leading wellness software" MINDBODY, allowing for class bookings and payment online. The site content consists of workout introductions, timetables, trainer intruductions, and of course company information and answers to frequently asked questions. Overall this is quite a package, so be sure to check them out.

Behind the scenes this site is powered by the Bootstrap front-end framework, along with various bits and pieces of JavaScript and specific tools – such as jQuery, and the jsSocials social network sharing plugin. Additionally the contact form of the site is powered by the FormBuilder Pro-module from Ryan.

Big thanks to the folks at Internet Dreams Studio for sharing yet another wonderful project with us, and congratulations to Victus Soul for their splendid new site – and of course all the best in their efforts!

Stay tuned for our next issue

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