For my OpenAustralia.org Hackfest project I picked up a task Matthew had in the queue for a possible OpenAustralia wordpress plguin.
The purpose of the plugin is to allow a blogger to quote speeches from members of parliament from the OpenAustralia API using their WordPress blog. The Task: A WordPress plugin.
Here is a sample of what has been done thus far:
1. Multiple Speeches within the same blog post
You will need to firstly grab the GID of the speech or speeches you want to link to. You can get the GID of a speech by copying it out of the “link to this” link on an OpenAustralia link:
![]()
Once you know the GID (Global ID) of an Open Australia Speech you can write this in Wordpress:
[polipress gid="2009-06-16.43.1 type="senate"]
2. Get a specific speech
We can have multiple debates quoted within the same blog-post, here is another of just a single speech:
[polipress gid="2009-03-19.174.2" type="representatives"]
3. Search Speeches
You can also return results of a search. For example, lets say I did a post on the NBN. I could display related topics about the NBN by writing the following:
[polipress search="nbn" type="representatives"]
3. Search Speeches and limit results
By default, the plugin will only return the first five results. This is for performance reasons more than anything else. You can change this by adding the num attribute. For example:
[polipress search="Community Affairs" type="representatives" num="6"]
Further Info
For more information about the OpenAustralia.org hackfest checkout the Google Open Source blog post.
11 Responses for "OpenAustralia.org Hackfest Project – Wordpress Plugin"
Looks like fun!
What about adding some attribution to those quotes (so we know who said it)…?
Great suggestion – I’ll put that in there too!
[...] made excellent progress developing a Wordpress plugin for OpenAustralia, which will allow you to quote speeches from OpenAustralia in your Wordpress blog. It is the first [...]
You might have an easier time with this (particularly regarding performance and ongoing maintenance of your plugin) if you use the shortcode API to replace your tags.
If you do so, your tags will look like this:
[openaustralia gid="2009-06-02.29.38"]
Not too different, but much more familiar to WordPress users and developers.
Great feedback thanks! Ill be sure to do so…
Ok version 1.0 is out, check out the details here: http://blog.sherifmansour.com/?p=419
Any feature requests, bugs etc.. post them on the Google Code page http://code.google.com/p/poli-press/
Nit:
“You will need to firstly grab the GID of the speech or speeches you want to link to. You can get the GUID of a speech by copying it out of the “link to this” link on an OpenAustralia link”
I think that “GUID” was meant to be “GID”
Thanks for picking it up! Fixed now..
[...] This allows any blogger using Wordpress to quote and comment speeches from Parliament from within their blog. Here is a sample: http://blog.sherifmansour.com/?p=363 [...]
[...] To see an example of what the plugin can do check out my previous blogpost. [...]
Leave a reply