ProcessWire Weekly #15

Issue #15 of ProcessWire Weekly brings in latest core updates and modules, introduces new featured site of the week.. and more. Read on!

Another week and another issue of ProcessWire Weekly. 15th issue isn't such a huge milestone yet, but it's absolutely thrilling to see how well these have been received – and it's always fun to write them too, as that really gives me a reason to dig deeper into all things ProcessWire.

This time we've split some of the core updates to a slightly shorter summary (included here) and a longer version located at processwire.com. Hope you'll enjoy this issue and please, if there's anything we could do better or add to future issues, don't hesitate to drop us a line.

Now, without further ado, let's get this thing started!

Summary of latest updates to ProcessWires dev branch

This week there were two rather significant updates/additions to the dev branch: new core feature WireDatabaseBackup added API-level support for database backups, and as if that wasn't big enough, Process modules became a lot smarter (which is quite a feat, actually).

We'll be going through both updates and providing basic code samples here, but please visit the links to processwire.com if you want to hear more. This is our first attempt to split the updates in summaries and full texts, so please forgive us if the balance is still a bit off!

Core level database backup support

New addition to the core package, WireDatabaseBackup is a class that provides features for backing up and restoring your site's database with just two very simple function calls:

// backup your entire database and return the filename of said backup
$file = $database->backups()->backup();

// restore an earlier backup (using the full path of .sql backup file)
$database->backups()->restore($file);

Ryan apparently has big plans for this feature already: not only will the installer start using it, it could also add future support for undoing template and field level changes.. and more. You can read more about WireDatabaseBackup at processwire.com.

Note: this feature is directly tied to a module we'll be introducing later in this issue. Read on to see what this awesome new tool already makes possible – and that's just the start!

Making Process modules smarter

Process modules power all the neat features you see in your site's Admin. Everything from Page List and Page Edit to Modules view are built as native Process modules, while the 3rd party Process modules add a plethora of new features on top of that.

With the latest batch of core updates, setting headlines and breadcrumbs in your own Process modules was just made a tad easier with new $this->headline('Your headline') and $this->breadcrumb('path', 'label') methods and Page creation was automated:

public static function getModuleInfo() {
  return array(
    'title' => 'Hello World',
    'version' => 1,
    'summary' => 'Just saying hello',
    'icon' => 'globe', // fa-icon to show with module
    'permission' => 'hello-world', // required permission to use
    'permissions' => array( // permissions to create at install
      'hello-world' => 'Use the fun Hello World process',
    ),
    'page' => array( // create a page at install
      'name' => 'hello-world',
      'parent' => 'setup'
    )
  );
}

Before this update each Process module had to handle creating (and later removing if the module was uninstalled) it's own Page. Not a difficult task by any means, but added some unnecessary complexity to Process modules nevertheless.

The way Ryan has built this new feature removes the need for such tasks; from now on Process modules handle this themselves. Less boilerplate code equals less work for module authors – and also less chance for mistakes. More details at processwire.com.

New module: general purpose oEmbed textformatter by Felix Wahner

New TextformatterOEmbed module built by Felix Wahner utilises PHP library called Essence and is, essentially, a general purpose oEmbed tool.

For those who don't know, oEmbed is a format for embedding content on other sites. What makes it great is that a lot of services have already embraced it – TextformatterOEmbed has out-of-the-box support for no less than 32 different services, including YouTube, Vimeo, Twitter, Instagram and SlideShare.

Personally I'm really looking forward to giving this little module a proper test run, but so far it's looking nothing short of awesome. Congratulations to Felix for a putting together a seriously useful module!

ProcessWire on the web: just a few recent highlights from here and there

Here's a collection of a few recent, useful articles, sites and resources discussing ProcessWire. Some you might've seen, some perhaps not, but here we go anyway:

If you've got any articles or other resources you'd like to share with us, please don't hesitate to post them as comments to this post. For more content, there's a forum thread dedicated to collecting such resources at the ProcessWire support forums too.

Introducing ProcessWire.tv: screencasts and video resources in one place

Here's yet another project by very productive Nico, with copy text provided by Joss Sanglier: ProcessWire.tv. This site introduces a collection of ProcessWire videos for your viewing pleasure – and look, I'm featured too!

The site has only just taken it's first steps, but it's already looking like a really good resource for all of us trying to learn more about ProcessWire. If you'd like to contribute, please take a look at the rather extensive how-to article written by Joss, and submit your videos to Nico via the submit link on the site!

Process Database Backups captures, stores and restores database backups

Here's a helpful module for securing your content: ProcessDatabaseBackups provides an Admin tool for easily backing up your site's database, storing multiple backups and restoring them with just a few clicks.

The module looks and feels absolutely great – just take a look at the screenshots below – but is still rather early release and, for the time being, requires latest dev release of ProcessWire. For stable ProcessWire versions there are alternatives available, though; most notably Schedule Cloud Backups introduced in ProcessWire Weekly #10.

Process Database Backups: list of existing backupsList of existing backups.

Process Database Backups: creating new backupCreating new backup of your site's database. Each backup may contain an optional description.

Process Database Backups: viewing an existing backupViewing one particular backup, with the options to download, delete or restore it.

For more details about Process Database Backups, including additional screenshots, please visit processwire.com where Ryan explains the module in his own words.

Stay tuned for our next issue

We're done for this week, but will be back with all new topics again next week. Our next issue will be out Saturday 30th of August and a newsletter version will be delivered a few days later to ProcessWire newsletter subscribers. Until then, happy hacking with ProcessWire!

Post a comment