The 590th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
Welcome to the latest issue of ProcessWire Weekly! In this week's issue we'll check out what's new in the development branch of ProcessWire, as well as introduce a new third party ProcessWire module RockDaemon, created by Bernhard Baumrock.
As always we've also got a new site of the week to highlight. This time that would be a Hungarian online magazine powered by ProcessWire: the IN Magazine. More about this exceptionally beautiful web magazine in just a bit, so keep on reading.
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
This week we've got some new core updates available via the dev branch of ProcessWire at GitHub. Most of these updates are bug fixes, but there is also one feature addition — the $notices->getVisible() method:
Add a Notices::getVisible() method that returns all Notice objects visible to current user.
This method is intended to return only the notices that current user should see, e.g. it will filter out anything only meant for superusers (unless the user is a superuser), etc. For more details about the $notices API variable, check out $notices at the API docs.
Here's a brief summary of what else is new this week in the core:
- A fix for issue #2106, where some admin features were relying on separate isAjax() method instead of $config->ajax. The core will now consistently use $config->ajax.
- A fix for issue #2116, where the return value of $files->render($file) on a file that returned an empty array would be an empty string, not an array as intended.
- A fix for issue #2117, where the anchor tag added in TinyMCE would not be visible when using the Konkat admin theme style.
- A fix for issue #2118, where AdminThemeUikit "Primary CSS file" notes referred to wrong file as the default CSS file.
- A fix for issue #2123, where the "today" button in a datetime field did not select current date, but rather just displayed current month. Though this appears to be how jQuery UI works, the core will now override it to actually select current day.
That's all for our core updates section this week, but keep on reading for other news. Thanks!
New module: RockDaemon
RockDaemon is a brand-new third party module created by Bernhard Baumrock. In a nutshell this module provides an easy way to run background jobs (daemons), with built-in features you're likely to need sooner or later:
- Prevents you from accidentally running multiple instances of the same daemon.
- Provides a configurable maximum runtime per job.
- Shuts jobs down gracefully on SIGINT or SIGTERM.
- Logging mechanism with automatic log pruning.
- Debug mode, enabled by providing the
-d
flag. - Web UI to view and manage running daemons.
Typically you want to run RockDaemon jobs using real cron, not lazy cron or a similar mechanism. As Bernhard explains in the docs for this module, a good way to achieve this is to set up a cron job that gets executed every minute, and use that to trigger a PHP script that boots up ProcessWire, loads RockDaemon, and runs a job:
<?php namespace ProcessWire;
// bootstrap ProcessWire
require_once __DIR__ . '/public/index.php';
// initialize a new daemon, called "my-daemon"
$daemon = wire()->modules->get('RockDaemon')->new('my-daemon');
$daemon->run(function (Daemon $daemon) {
// ... any code you want to execute in the background ...
// write a log message
$daemon->log(
message: "my-daemon executed",
logname: "my-daemon",
pruneDays: 30,
);
});
This is, obviously, just a simplified example: the function provided to the run method is where you'll want to do any background task execution, and RockDaemon also provides various helpful API features that you can make use of (in addition to "run" and "log").
Be sure to check out the RockDaemon docs at baumrock.com for more details. The docs also explain in detail when, where, and how you might want to use this module. If you'd like to give this module a try, you can get it from the RockDaemon GitHub repository. If you have questions or feedback, head down to the RockDaemon support thread.
Big thanks to Bernhard for creating this module and sharing it with us!
Site of the week: IN Magazine
Our latest site of the week is IN Magazine, an online magazine covering topics such as fashion, culture, lifestyle, and gastronomy. IN Magazine is a Hungarian publication, and the site's language is also Hungarian. Good thing that there are plenty of translation tools out there for the rest of us.
With our inspiring, intelligent and innovative articles, interviews, podcasts and videos, we represent a new perspective on the online magazine market.
— IN Magazine
In addition to the obvious thing, which is the content, another aspect that sets this site apart is the design — which is splendid to say the least. The visual style is quite minimal, but the layout is full of variance and nuance, and any lack of colour in the visual style itself is easily balanced by the use of visually striking article images.
The IN Magazine website was created by HG Media, and based on a quick peek behind the scenes the front-end of this site appears to be powered by the Uikit front-end framework. As for non-core ProcessWire modules, the only familiar one that we could spot is the commercial caching and minification tool ProCache.
Our congratulations to IN Magazine and the team at HG Media for a job well done on this splendid, ProcessWire powered website!
Stay tuned for our next issue
That's it for the 590th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 6th of September. 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