In the 296th issue of ProcessWire Weekly we're going to introduce the newly released front-end file uploads support for LoginRegisterPro, introduce a couple of third party modules, and more. Read on!
Welcome to the latest issue of ProcessWire Weekly! This time we're going to take a quick look back at last week's master release, and introduce a new companion module for the LoginRegisterPro module.
In terms of third party modules, we've got a couple of those, both by Robin Sallis: Auto Template Stubs is a brand new one, while Add Image URLs has been around for a while already. Add Image URLs was only just added to the modules directory, so we thought it'd be a good time to take another look at it, and see where it stands now.
Our latest site of the week belongs to a German organization known as DOMiD, or the Documentation center and Museum of Migration in Germany. Their newly released website was created by schwarzdesign, and we'll take a closer look at that in 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!
Weekly update from Ryan – front-end file uploads for LoginRegisterPro
Last week we had pretty big core-related news as a new master release of ProcessWire – 3.0.148 – had just been released. As a quick update on that topic, it has been smooth sailing so far, and we haven't heard of any notable issues related to the new version.
As always there's no need to rush things if you're already happy, but 3.0.148 brings quite a few new options to the table should you ever need them – so, in the off case that you were just waiting to see how the release goes before updating, this would be a great time to update. Just saying.
It's also good to keep in mind that in our case when a release is introduced from the dev branch to the master branch, it has already been battle-tested by numerous users – and as such issues discovered in the master release are indeed a rare occurrence.
Front-end file uploads for LoginRegisterPro
This week there was just one small core addition (on the dev branch), as Ryan has been focusing on the front-end file upload feature for the commercial LoginRegisterPro module. As a result said feature is now available to download for LoginRegisterPro users, and there's already a separate, rather detailed documentation page for it as well.
For those not already familiar with the concept, the long story short is that while ProcessWire provides brilliant native support for file and image uploading and handling in the Admin, modules such as LoginRegisterPro require front-end file uploads, which is a different beast altogether. For starters front-end file uploads involve security concerns that are nonexistent – or, at the very least, less problematic to handle – in the Admin.
As a result the newly released front-end file uploads module is actually a completely separate inputfield type, and although it provides drop-in compatibility with existing InputfieldFile and InputfieldImage modules, they don't actually share much code.
Here's a little sneak-peek into the feature set provided by the InputfieldFrontendFile module:
- Drag and drop Ajax image upload support.
- Thumbnails for already uploaded files/images.
- Drag-sorting of files or images.
- Ability to view file details and edit file descriptions.
- Client-side image resizing (in addition to server-side).
- File-upload progress indicator.
... and more. For a full list of features, and a few additional screen shots of the front-end file upload inputfield in action, be sure to check out the front-end file uploads documentation page. Thanks!
New module: Auto Template Stubs
Auto Template Stubs, a new module from Robin Sallis, was developed to make working with ProcessWire Page objects easier in an IDE. When a template changes, this module automatically creates so-called stubs (sort of definition files) for them – which, in turn, adds features such as autocompletion suggestions to properly configured IDEs.
For the most part this module is fully automatic, creating stubs behind the scenes and storing them as files into the cache directory. Only thing you need to do in order to get the IDE to use the correct stub is to include a reference to it into your template files, preferably close to the beginning of the file:
/* @var tpl_home $page */
What this does is that it instructs the IDE about a stub file that relates to current $page API variable, which in turn allows the IDE to display additional details when you access this variable or one of its properties (fields). Such additional information includes, for an example, autocomplete suggestions, type checking, and in-context documentation – all of which can help you write code more efficiently and avoid mistakes.
For more details be sure to check out the dedicated Auto Template Stubs support forum thread and the Auto Template Stubs GitHub repository. This module can be installed via the built-in module installer in Admin or by downloading its files directly from GitHub.
Thanks to Robin for sharing this module with us – it's a brilliant developer helper, and there's no doubt that it'll prove out to be quite useful in the long run!
Reintroducing the Add Image URLs module
Add Image URLs, another module by Robin Sallis, has been around for a while already, but now that it has been added to the official modules directory we thought it'd be a good time to take another look and see what's new. For the record: this module was originally released back in 2017, and was also covered in ProcessWire Weekly #187.
The original idea behind Add Image URLs was quite straightforward: add a new button to Image inputfield for displaying a textarea. When you add URLs to images into said textarea and save, the module will download the images they point to and add them into the field.
Here's a GIF animation showcasing the module in action:
Aforementioned behaviour hasn't changed since the initial release of this module, but one quite notable addition was made just this week: in spite of its name, Add Image URLs now supports File inputfields as well as Image inputfields, basically duplicating the behaviour describe above for uploading files from URLs as well.
Check out the Add Image URLs support forum thread for more details, and feel free to install the module via the module installer in Admin, or by downloading the module files from the Add Image URLs GitHub repository.
Thanks again to Robin for another great contribution!
Site of the week: DOMiD, the Documentation center and Museum of Migration in Germany
The roots of the organization go way back to 1990, when DOMiT – The Documentation Center and Museum of Migration from Turkey – was founded, and under the current name it has existed since 2007. The goal of the organization is to collect, study, and document the history of migration in Germany, unmasking the diverse history behind it, and ultimately convey migration as a norm.
DOMiD's vision is one of a solidary, anti-racist society of the many with equal rights for all, which recognises migration as a formative power.
— The DOMiD Mission & Vision
The multi-lingual and responsive website of DOMiD is a splendid mix of gorgeous visuals and quality content in the form of text, images, and videos. It's obvious that content is on the focus on this site, and thanks to the pleasant layout and beautiful typography said content is also quite easy and enjoyable to follow.
More details about what goes on behind the scenes on this site can be found from the showcase forum thread for the DOMiD website, but some highlights here include the use of a RepeaterMatrix based content builder and pre-built, easy to embed forms powered by the FormBuilder module.
Our congratulations for their gorgeous website to DOMiD, and big thanks to the folks schwarzdesign for sharing this project with us. Great work as always!
Stay tuned for our next issue
That's all for the 296th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 18th 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!