Wordpress

Open Graph protocol seems pretty cool

Oliver Brown
— This upcoming video may not be available to view yet.

A few days ago Facebook announced their new Open Graph Protocol.

It’s basically a way for people to interact with pages on the internet (in theory pages representing real world items, but it will be hard to moderate) in basically the same way as they do with existing Facebook pages. For a page to be eligible all you need to do is add a few meta tags to it specifying its  name and type (film, book, actor, product, game etc.). To actually do anything useful, you then add a Facebook “like” button. Once some people have liked it, it appears in their Facebook news feed like any other item (with the data you added in the meta tags).

One of the optional meta tags you can add specifies user IDs of Facebook users who can administrate the page. If you do, you can get access to the same sort of admin page you get with any traditional Facebook page. Conveniently I just developed a use for this sort of thing so I added support to my blog. A few edits to the theme and cunning use of Wordpress’s custom fields and now any page or post on my site can support Open Graph.

Currently the only support is on the Gravitas page.

New Look - New Features

Oliver Brown
— This upcoming video may not be available to view yet.

I finally decided to start posting to my blog with some regularity again. Whether it will last, I can’t say.

As part of the relaunch I’ve finally upgraded Wordpress to a more respectable (and secure) version, found a new theme and added some cool stuff, including OpenID support for comment posting. All the posts and comments should be intact and everything should be working properly, but random behaviour for the next few days shouldn’t be unexpected…

How to get more visitors to old content

Oliver Brown
— This upcoming video may not be available to view yet.

One of the main advantages of blogs as a publishing medium is also a big disadvantage at times - the time sensitive nature. The fact that the information is about as up to the minute as you can get (in general) means blogs are a better source of news (or more importantly opinions about news) than search engine results for instance. But this means that some of your content can be come rather pointless after a short time.

Some articles are essentially timeless however. If you’re lucky and lots of people link to them you should be able to get some steady search engine traffic but people looking for something that specific aren’t likely to hang around after reading them. So FeedCycle.com have come up with a reasonably clever way of letting you push your old content but still keeping a blogesque feel to it.

The idea is to create a custom feed of a subsection of your content. The example they push a lot is a podcast “series” about the same topic, but it can be any thematically linked (and generally ordered) series of posts from your blog. When someone subscribes they get the first post in the series. The next day, they get the next post and so on until the end of the series. There is a plug-in somewhere for Wordpress that lets you mark posts as part of a series and to create navigation links to quickly get between them. Used in conjunction with this would let your users read through the whole series or just sit back and have it delivered.

Now if only I ever posted such a series…

Even simpler searching

Oliver Brown
— This upcoming video may not be available to view yet.

I decided to take my idea for nicer searching in Wordpress one step further. Now if you try to get to a page that doesn’t exist it automatically redirects to the search page. So http://www.oliverbrown.me.uk/galaxia will return search results for “galaxia”.

If you want to do it yourself, you need to do two things. First you need to redirect error pages to a custom PHP page so add the following line to the top of your .htaccess file: ErrorDocument: 404error.php Now you need to create 404error.php and make it redirect to the search page by adding the following to it: header('Location: http://' . $_SERVER['HTTP_HOST'] . '/search.php?s=' . $_SERVER['REDIRECT_SCRIPT_URL']); After doing this it had me thinking about status codes. By default that will generate a 302 Found HTTP status code. A bit of reading led me to decide that 303 See Other was a better response since the request might correspond to a page in the future (and presumably a relevant page) but for now should be redirected. 3XX are somewhat confusing.

Anyway if you want that behaviour, add this line too: header('Status: 303 See Other'); Finally, you should think a little before implementing this since any random page accessed could now be cached by proxy servers and search engines etc. since the server is no longer sending a 404 Not Found code.

Let there be colour

Oliver Brown
— This upcoming video may not be available to view yet.

I decided if Ryan is going to post more often there needs to be an easier way to tell our posts apart, so I decided to fiddle around with the theme a bit. Basically all I did was put a div tag around all the posts setting the class to the author of the post and then added style information for .Ryan and .Oliver. I also changed the top header slightly too.