Google reader “shared items” plugin for wordpress

I find google reader a useful way to aggregate information from many blogs. Particularly convenient is to be able to read these on my iPhone and then mark them as shared. That way I can build up a list of information I am interested in.

This is then conveniently exposed as an RSS feed by google. You can see my shared items at for example.

I used to have a sidebar on this site which had a snippet directly from google reader, but it was determined to have its own style. I wanted a wordpress plugin that would do it for me and found “Recommended Reading Google Reader” by C. Murray Consulting

Its the nice “READING” section on my sidebar. Thanks guys! You just saved me from writing my own!


WordPress ShortCode plugin for google syntax highlighter

I have been using the google syntax highlighter plugin for a while now, but its been bugging me a little that I have to type

<pre name="code" class="html:nogutter:nocontrols">
Some code goes here

In order to put in some java code. Infact, I can hardly ever remember the invocation.

I discovered Shortcodes for wordpress which is a simple way to write little plugins. So I wrote my own. Just pop it in your plugins directory and go activate from WordPress.

Now i can type:

public class MyClass {

Unfortunately it only works in later versions of WordPress (at least 2.5), this blog is 2.04 and so I may have to upgrade, which I am scared of because of all the customisations I’ve made.


Now ive upgraded, so here’s some Java!

public class SomeSillyClass {
    public static void main (String[] args) {
        System.out.println(“WordPress Rocks!”);

Some hard won knowledge was that not only do the stylesheets control the look and feel, but also the javascript “brushes” which are found in the script folder for the google syntax plugin (e.g. shBrushRuby.js)


CSS Tips and tricks…

I was just working with Tom on trying to get some CSS to work properly for a project he’s working on.

The problem was divs flowing outside their parents. I was reminded of some pages I used to have up which demonstrate various div layout issues and show some fixes. I have now added them back into this site and they are here.

They key point for quite a few of the solutions there and hopefully for Toms’ solution (except its not quite finished yet) was that sometimes if you have some floats knowing around, it can be useful to have another, empty div with a style set to clear:both; this forces the floating to stop and makes the parent div expand (or should do anyway).

Oh yeah, an important resource that helped me to solve these problems was Eric Meyer’s site.


Feeds from my blog

Have been waiting for the launch of our new exciting blogs on the guardian site, e.g. Science Blog and in the meantime working on this, my blog. I want to be able to feed some of my posts to the thoughtworks blogspace, and have discovered that wordpress ROCKS at this. you simply put the category name and /feeds at the end, e.g. : feed:// sweet as!

So I will create a new category called thoughtblog and then just assign this to each post i want to include!