39th issue of ProcessWire Weekly: latest core updates, modules, another awesome site of the week, and more. Sit down, stick around and read on!
Another week and another ProcessWire Weekly. Last time we introduced a whole bunch of new modules, and this time we're going to give a bit more focus to the core updates – though we do still have one rather fascinating module to introduce, and as a bit of a special treat, we're also taking a quick look at a new and very neat command-line tool.
All in all we really hope that you enjoy your stay here, and please don't hesitate to drop us a line if there's anything you'd like to say. Requests, suggestions, corrections – we're always happy to receive your input.
Now, let's get this issue started!
Core updates for the week
We're happy to say that there's a whole bunch of core updates for the week – again. Please note that, once again, this is just a summary of Ryan's latest processwire.com blog post; for more details, usage instructions, screenshots, etc. head down to the ProcessWire blog.
Updates to the field editor: introducing a brand new "Actions" view and improving the "clone field" feature
This week's update streamlines the process of connecting fields and templates by introducing a brand new Actions tab to the field editor. Actions is an overview of existing templates on your site, with checkboxes next to each of those – by checking (or unchecking) said checkboxes you can very easily manage exactly which templates current field belongs to.
Consider a situation where you're adding a new field: instead of adding the field and then going through each and every template you wish to add it to one by one, you can check the templates right from the field editor and hit "save". Removing a field from a bunch of templates also used to require editing each template individually; from now on it's a one-step process.
Another update related to the field editor streamlines the "clone field" feature. Previously you couldn't pick a name for your cloned field, which meant that you pretty much always had to go back and rename the cloned field. From now on the clone field feature politely asks for your newly cloned field, removing one more extra step.
Both updates fit nicely within our recent series of updates promoting rapid development with ProcessWire. Our Admin tool was already powerful, but recently we've seen it improving a lot more in this regard – and we're eager to see just how far we can take it!
Session improvements: new logging features, real-time session tracking, preventing cleanup issues, and more
While the field editor updates discussed above were all about streamlining the process of creating and structuring content, the session updates are more about strengthening some of the more fundamental parts of ProcessWire – and enabling you to implement new kinds of features with ease:
- Live updated session viewing tool for database sessions enables you to see a real-time view of active sessions on your site. Active users, pages they're visiting, and so on. This is a bit like a real-time analytics tool, really, and looks very cool indeed!
- API access to session history gives you details about the pages that current user has visited recently using the newly added
$session->getHistory()method. Note: this feature is disabled by default, but you can enable it via
$config->sessionHistorysetting; set the value of said variable to the number of history rows you want to store.
- Configurable session fingerprints allow you to configure exactly how this particular security feature works. Most of the time there's no need to touch this, but in some specific cases (users with highly dynamic IP addresses) this can be really useful.
- Improvements to session cleanup, when PHP's native garbage collector is disabled, are probably the most technical bit here, so don't worry if it doesn't ring a bell; in a nutshell this fixes an issue where old session files weren't necessarily cleaned up as expected in some specific cases.
Introducing a simple command-line tool for accessing page content
While most of ProcessWire's use cases are closely related to web-based sites and applications, it also supports a really cool feature known as bootstrapping. In essence this means including ProcessWire's index.php directly within another PHP script and thus gaining full access to it's API.
From integrating ProcessWire with another platform to building stand-alone CLI tools, this has a wide range of potential use cases. Francesco Schwarz recently showcased this by creating a very handy command-line tool known simply as
pw-cli – a helper script for easily querying and displaying content from a ProcessWire site.
For more details and examples of the output generated by this nifty little script, head down to the forum post introducing pw-cli. Thanks to Francesco for providing us a nice example of the kinds of things one can achieve with ProcessWire and a little bit of command-line magic!
DownloadGuard for ProcessWire
DownloadGuard is a new module for ProcessWire, built and published by first-time module author, Martin Knorr. The module, plain and simple, allows you to offer secure downloads for your users – clients, visitors, and consumers.
Each protected download has a running counter. Via module settings you can configure the default number of allowed downloads, and you can also specify a custom value for each file. Another module setting allows you to define the validity period for protected downloads.
All in all this module brings in a lot more than its list of features might suggest: it allows you to easily set up a service that has previously required quite a bit of custom work. From our point of view that's pretty awesome, and we'd like to congratulate Martin for a great first module!
Site of the week: Dsquared, a creative agency based in the UK
Dsquared is a UK-based creative design agency with a vast amount of experience from all sorts of marketing and design projects. By their own words, they swear on three core values: experience, commitment, and expertise.
The site looks pretty neat on all sorts of devices. Simplicity, responsiveness, and focus on content; that's a winning combination. Once again a good reminder that a great site isn't necessarily one with a lot of bells and whistles – in fact, often it's quite the opposite.
Thanks to Dsquared for submitting another great site for the ProcessWire sites directory. Hope to see more of your ProcessWire work there too!
Stay tuned for our next issue
That's it for the 39th issue of ProcessWire Weekly. We'll be back with more news, updates, and content next Saturday, 14th of February – which, by the way, just happens to be the Valentine's day. 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!
Martin on Monday 9th of February 2015 11:18 am
thanks for the mention in the weekly news! :) what an honor.
As always, very informative! Tanks!