Simon Dickson has been blogging about online government, politics and WordPress since 2005.
Some important people read it.

 
 

Archive for 'plugin'


Friday 17 June 2011

On government organograms and RDF files (includes free WordPress plugin!)

There was an initial buzz of excitement yesterday, at the launch of the new data.gov.uk interactive organograms... and then, by teatime, a bit of a backlash. I can see both sides myself. Yes, it's a very cool rendering of potentially quite dull data, and it's nice to see it done in javascript (jQuery) rather than Flash... but it's actually a bit fiddly to navigate through. That isn't to understate the significance of the achievement, though: such a coordinated leap forward, in both technical and bureaucratic terms, is no small task. And there's so much to it, most of which is beyond me, that I can't begin to explain it in depth. Hopefully someone else will oblige.

As part of the initiative, departments have been instructed to upload raw RDF files to their websites, from which the organograms can be generated... which caused a bit of a problem for one of our clients. But it's a problem we're happily able to solve.

The Wales Office was the first Ministerial department to move everything over to WordPress, back in early 2008; and they've been running very happily on it ever since. About a year ago, we helped them build a new Transparency section, which acts as a download area for (mostly) Word and CSV files. It's all rendered via a custom page template, and managed via the standard WordPress 'media library' functionality. Unspectacular perhaps, but quick and easy for all concerned.

However - when they tried to upload an RDF file, they couldn't. WordPress has a surprisingly long list of file types it's prepared to let you upload (look for get_allowed_mime_types() in wp-includes/functions.php): but RDF isn't on it. So it throws up an error message like this:

We could upload it as a zip file, which would have the added benefit of reducing the file size by 90-odd per cent... but then the orgchart generator wouldn't be able to process it. Dilemma.

But as ever with WordPress, there's a happy ending to the story. We - by which I specifically mean my technical partner, Mr Wheatley - were able to write a quick plugin to 'hook' on to approved filetype list, and stick RDF on the end. Problem solved, file uploaded, everyone happy. You can see the successfully uploaded file here.

And given that there are a good number of government departments running WordPress sites, including at least one other using WordPress specifically for its transparency information, we thought we'd do the decent thing, and offer it up for others to download. Here you go. There's no configuration interface needed; just upload it, activate it, and start chucking up RDF files to your heart's content.

Add a comment

Wednesday 26 August 2009

WordPress plugin: Robots.txt Reminder

Robots.txt Reminder

I'm sure we've all done it. You're creating a new WordPress installation, and for a bit of privacy whilst you build the thing, you choose not to 'allow my blog to appear in search engines like Google and Technorati'. But in the rush to get the site out the door, you forget to switch the setting to make it 'visible to everyone, including search engines'.

So I've created a laughably simple WordPress plugin called 'Robots.txt Reminder', which adds a notification message to the top of all Admin pages if it detects that (a) your blog is set to block search engines, and (b) your user capabilities allow you to make the change. It's kinda hard to ignore, but that's kinda the point.

Click here to download robotreminder.zip, then - assuming you're using one of the more recent versions of WordPress, and are able to do automated updating - upload the zip file as-is, by clicking on Plugins -> Add New -> Upload.

It's not the first plugin I've ever coded, but it's the first plugin I've ever 'released' like this, so please be gentle. :)

Comments: 6