When BIS was created, we were pretty chuffed to have got a solid website built and launched in 72 hours. But as the weeks passed and the organisation started to build up achievements and an identity of its own, people started to ask when something, y’know, a bit meatier was going to arrive. Today, we launched version 1.1 which is the next step on that journey.
1.1 is always an important milestone. The excitement, the blank canvas and the pressure of 1.0 are behind you. The feedback has started to come in. The team starts to think about version 2.0 but right now, it’s important to deliver something just a bit better than what we’ve got which fixes the glaring bugs and takes on board the good ideas – and that’s where 1.1 comes in.
I’ll leave BIS’ resident celebrity webby to explain more of the strategy, save to say that this version is principally about a nicer look and feel and a larger scope of content, moving in the direction of 2.0 due early next year, but still on the WordPress platform and developed in-house by the team for zero external development cost. For now, I just wanted to share three little code snippets I contributed towards:
WordPress’ built-in RSS widget is handy in a pinch, but it’s not ideal. It predefines the format of the list, and makes the title of the widget link to the specified URL in the feed, even if this isn’t really what you want (e.g. a Pipes page or a search form). So I spent a satisfying evening head scratching and learning how to roll my own* WordPress
plugin widget and came up with RSS Extra which lets you:
- specify the link to use in the title of the widget
- add some arbitrary html above and below the feed listing
- show the date in a friendlier format
- decide whether or not you want to show the orange RSS icon in the header
The refreshed BIS site uses the widget to show news items and speeches, linking to our own news page, of which more below.
* (yes, I know there are more sophisticated alternatives)
2. RSS Librarian
It was decided a while ago to use COI’s News Distribution Service to handle online publication of our news releases – rather than duplicate effort by adding them separately to an archive on the BIS site. It’s a sophisticated service well-used by press officers and journalists, and a great cross-government resource. But we’d like to feature the stories we publish there on our own site too, since there isn’t an easy way to link to a listing of BIS releases on the NDS site itself. NDS offers an RSS feed which could make this possible, though it is reset on a monthly basis so isn’t a workable archive.
RSS Librarian is a little script run on a cron job to grab an RSS feed, check it for new items, and store those items locally in a monthly archive and a global archive. This drives the BIS news archive. To me, this is RSS fulfilling its potential as a proper syndication tool between government sites which delivers a better user experience as well as reduced costs by creating once and publishing twice.
3. Did you mean?
With two sites merging into one, there’s been a misconception amongst some colleagues that a www.legacysite.gov.uk/url/to/something address will automatically now be accessible via www.newsite.gov.uk/url/to/something. We’ve put some redirects in on an ad hoc basis, but in a large corporate organisation, it’s hard to avoid people making assumptions which could lead to irritated users hitting 404 errors. So – by far the simplest of these code snippets – is a little checker included in the WordPress 404 page which takes the requested URL, goes off and checks if it’s valid on each of the legacy sites, and if so, suggests that that may in fact be where you intended to go.
These are all free to adapt and reuse under, for now, Crown Copyright and a GPL licence.