ProcessWire Weekly #234

In the 234th issue of ProcessWire Weekly we're going to cover ProcessWire 3.0.118, introduce Fieldtype Datetime Advanced, and check out the downright brilliant, ProcessWire powered website of Internet Dreams Studio. Read on!

Welcome to the 234th issue of ProcessWire Weekly. This week we're going to dig into the latest dev release of ProcessWire, 3.0.118, and take a closer look at the new API methods and redirect management UI included in this version.

In other news we're introducing a brand new fieldtype module from BitPoet: Fieldtype Datetime Advanced – a replacement for ProcessWire's built-in Datetime fieldtype with added support for subfield selectors. Our latest site of the week belongs to a London based web design agency Internet Dreams Studio.

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.118 improves redirect management and adds new $files API methods

In his latest post at the processwire.com blog Ryan walks us through the latest ProcessWire dev release, 3.0.118. This release contains some pretty interesting updates to the built-in redirect management (PagePathHistory) and also some new features for the $files API variable:

  • The built-in PagePathHistory module automatically keeps track of old URLs and redirects them to current one when the URL of a specific page has changed. Brand new API methods $page->addUrl('/some/url/') and $page->removeUrl('/some/url/') provide an easy method of adding custom URLs to the redirection mechanism manually.
  • Another redirect and PagePathHistory related update for this week is the page level UI for displaying and managing (removing or adding) redirects for a specific page. For this purpose a new fieldset has been added to the Settings tab in the Page Editor. Note, though, that currently this tool is limited to Superusers only.
  • New $files API methods $files->unlink($filename) and $files->rename($oldFilename, $newFilename) were added to the WireFileTools core class. These work similarly to the native PHP features, i.e. provide support for removing (unlinking) or renaming files, but include some extra validation and security checks.

In other news the default admin theme of Processwire 3.x, AdminThemeUikit, now includes a new release candidate version of Uikit 3. There may be another update to this soon as Uikit 3 gets closer to a stable release, but considering how stable it has already been in practice, this update is probably going to be unnoticeable for most ProcessWire users.

For more details about this week's updates, some notes about built-in redirection handling and it's limitations, and also some additional tips for managing redirects during site migrations and such, be sure to check out Ryan's weekly post at the processwire.com blog. Thanks!

New module: Fieldtype Datetime Advanced

Fieldtype Datetime Advanced is a newly released fieldtype module from BitPoet. It's a replacement for ProcessWire's native Datetime fieldtype with added support for subfield selector: year, month, hour, the day of year, and so on. For a full list of all the subfields that Datetime Advanced supports, check out the modules directory page.

The usage of Fieldtype Datetime Advanced is really simple, and in the most basic form there's literally no difference to the core Datetime fieldtype. The true strength of this module is the subselector support, which allows you to perform queries like these:

$pagelist = $pages->find("mydatefield.year=2016");
$maypages = $pagelist->filter("mydatefield.month=5");

You can also access these subfields in, say, your template files:

$blogentry = $pages->get('blog-entry-1');
echo $blogentry->title . "(" . $blogentry->publishdate->year . ")";

It's worth noting, though, that this module depends on MySQL timezone support, which by default isn't available on many MySQL setups. Please check the modules directory page for Fieldtype Datetime Advanced for more details, and some general instructions for enabling MySQL timezone support.

Big thanks to BitPoet for yet another useful contribution to ProcessWire – this fieldtype will definitely come in handy in various future projects!

Site of the week: Internet Dreams Studio

Our latest site of the week belongs to the London based web design agency Internet Dreams Studio. By combining the skills of talented in-house web designers, developers, search and social strategists they deliver various services – website design, mobile, web development, eCommerce, iOS & Android, strategy, online marketing, SEO, social and analytics – for their UK based clientele.

The visuals on this website are nothing short of stunning: the base layout is pretty straightforward and there's a minimal amount of fixed UI elements, but the typography is both readable and beautiful, and screen captures and other work samples are combined with mainly aesthetic placeholder images for a really lively and refreshing look and feel. The site is responsive and also performs exceptionally, so no complaints there either.

The front-end of this site seems to be using the Bootstrap front-end framework, or at least that's what the grid classes suggest. Other than that there are some typical dependencies – such as Google Fonts, jQuery, and Owl Carousel – but nothing that would really pop out. One part of this site that really deserves a special mention is the 404 page, which lets you play a JS Asteroids clone. Can't remember the last time when I was honestly happy that the content I was looking for was not found.

Big thanks to the folks at Internet Dreams Studio for sharing this site with us. It's always great to see agencies choosing ProcessWire!

Stay tuned for our next issue

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