I’m chuffed to see Puffbox and the Department for International Development (DFID) launch the new DFID group blog. Naturally it’s always nice to see our government open up to us, the people of Britain, but I’m particularly gratified that they’re using some of my WordPress plugins to do it.
The map page on the DFID blog is powered by my Author Locations plugin. Author Locations allows each author on the WordPress blog to set their current location in the world. The plugin also provides a new template tag and shortcode which allows the output of a Google map with pins showing all the authors; clicking on each pin pops an infoWindow bubble which briefly introduces the author and links to their latest post. Naturally, the list of authors is marked up with the semantically rich hCard and geo microformats.
The front page on the DFID blog is powered by my Author Listings plugin. Author Listings provides template tags to list the active and inactive authors. Parameters on the template tags allows you to specify how many days an author needs to have been quiet for before they are considered inactive. The list of authors can include a title, summary, etc of each authors’ recent post. Again, the list of authors is marked up with the semantic goodness of hCard.
The third plugin is a little more crafty. The User Photo plugin, by Weston Ruter, is an excellent plugin, providing each author on the blog with their own photo. (Did you guess that from the plugin name? Am I overexplaining?) The only flaw was that Puffbox, the producers of the new DFID group blog, wanted square thumbnails and that’s not something that the User Photo plugin does. Faced with this I didn’t want to go patching (editing) the User Photo plugin; I didn’t want to fork (launch a competing, altered, version of the plugin); and I certainly didn’t want to write a new user photo plugin from scratch when most of the work was already there. The solution was to write something which snuck in and cropped the uploaded files intended for User Photo (UP), and then got out of the way to let UP do it’s stuff. So Square Thumbnails for User Photo does exactly that, it sneaks in with a bit of JavaScript UI which allows the user to crop their photo to a square, then saves it in the UP format and leaves UP to it’s business. I’m pleased with how this one turned out.
For all of these plugins, my recent discovery of John Godley‘s WordPress plugin base class was a great help. The plugin base class is a bit of programming code goodness which provides all sorts of handy functionality and shortcuts, all of which make writing plugins much easier. To my mind the most awesome facility provided by the class is the ability to use templates in a plugin which can be overriden by the theme designer… as John says:
…one golden rule of plugin creation is that someone will always want to change the formatting and style of your output…
…and of course the moment the theme designer changes plugin code, updating that plugin becomes much harder; particularly now WordPress provides the ability to automatically update plugins (which also automatically overrides any plugin changes). The plugin base class doesn’t have a download site, but if you download any of John’s other plugins you’ll get it included; and remember kids, if you’re using code developed by John, which he provides for free and invests his time supporting, a donation is only fair.
Last but not at all least: Puffbox and Tony Parsons have done a superb job on the production and design, respectively, of this blog. I’m looking forward to seeing where our foreign aid money goes, and how it gets spent.
Some other coverage from around the web:
Leave a comment