Drupal Module Updates via iPhone Push Notifications

12th June 2011 | Tags:

If you’ve looked after a Dru­pal web­site for any length of time you’ll know that you should reg­u­larly update mod­ules, themes and most impor­tantly the Dru­pal core as-​and-​when updates become avail­able — secu­rity updates, at the very least. The Update Sta­tus mod­ule (now in core) is great for sum­maris­ing what needs updat­ing (if you haven’t enabled that mod­ule, you really should do), but if you really want to stay on top of those updates then there’s a fairly sim­ple way in which you can get them sent to your iPhone (or indeed iPad) as a push noti­fi­ca­tion. Here’s how. First, you’ll need to down­load Prowl from the App Store — at the time of writ­ing it costs £1.79, or $2.99 in the US. Next up, you’ll need to cre­ate an account on the Prowl web­site. Then, you will need to gen­er­ate an API key — you can cre­ate as many of these as you wish, and there’s no addi­tional charge for doing so. As you can see from the screen­shot below, the API Keys tab shows any exist­ing keys, and the form at the bot­tom is used to cre­ate a new one — all you need is a note to remind your­self what it’s for. Enter some­thing to do with the site you’re adding, e.g. “My Dru­pal Web­site” and hit Gen­er­ate Key

Configuring Prowl API keys, for iOS Push Notifications for Drupal
The Prowl web inter­face allows to you to add and edit API keys, allow­ing you to receive push noti­fi­ca­tions to your iPhone or iPad

Next up, you’ll need to down­load and install the Dru­pal mod­ule. You will then need down­load and install the ProwlPHP class as instructed by the READMEdown­load it from Github and then place it in a direc­tory (within the module’s direc­tory) called ProwlPHP. Set­ting up the Dru­pal mod­ule is pretty straight­for­ward; sim­ply nav­i­gate to Site Con­fig­u­ra­tion → Prowl push noti­fi­ca­tions and you’ll see the fol­low­ing screen:

Configuring Prowl for Drupal, to enable you to receive push notifications to your iPhone or iPad from Drupal
Enter the API key you gen­er­ated using the Prowl web app

As you can see, you sim­ply need to enter the API key you cre­ated ear­lier and then select which noti­fi­ca­tions to receive — Mod­ules with secu­rity updates only, or All mod­ules with updates. That’s it — your Dru­pal web­site should now send you a push noti­fi­ca­tion when updates are avail­able. Of course, in a way this is a fairly triv­ial exam­ple of using push noti­fi­ca­tions with Dru­pal — if you wish to receive noti­fi­ca­tions for other pur­poses, the mod­ule plays nicely with actions, or you may wish to dig into the code and look at prowl_send_admin_notification or prowl_send_any_user_notification. An addi­tional mod­ule also ships with the Prowl Dru­pal mod­ule for assign­ing Prowl accounts to indi­vid­ual users, and you may wish to look at the Mes­sag­ing Frame­work inte­gra­tion. If you come up with any imag­i­na­tive ways of using push noti­fi­ca­tions in Dru­pal, do let me know in the comments.


No comments yet.

Links and images are allowed, but please note that rel="nofollow" will be automactically appended to any links.