Wednesday, January 30, 2008

OEDILF Google Widget


I've been wanting a way to link my OEDILF contributions to my blog and finally got around to figuring out how. The result is a Google Gadget that displays OEDILF limericks! I had a blast making this. What is so exciting about using Google's API is that it really makes you feel like you are programming on a grand scale. They have the distribution channel and the libraries all there. You just need an idea. Anyway, to cut to the chase, here is how to embed my gadget onto your blog (it is a bit clunky to do this because using gadgets in blogger is a bit of a new thing):

  1. Since the feature that allows putting google gadgets into blogger is still very new you need to log into your blog via this URL.
  2. Go to Template > Add a Page Element > Gadget (Add to Blog) > Add your own
  3. Then paste in this url http://hosting.gmodules.com/ig/gadgets/file/113358134765646390343/oedilf.xml
By default the gadget will pull down the most recent 20 approved OEDILF limericks and display a random one from that set. You can turn off the randomization so it always displays the latest submission. You can also enter a particular author's OEDILF ID to get a stream of just the limericks from that author.

Here is a button that will add the gadget directly to your iGoogle home page. Add to Google

If you are interested in how all this works you can view the code for this gadget here. And here is a link to the gadget API. The library is pretty nice and makes things like grabbing RSS feeds a piece of cake. Happy coding, or limericking, whatever you plan to do after reading this. Edit: 1/30/08 - Gadget checked into subversion. Project page is here.

2 comments:

Jim Pettit said...

Nicely done, Joshua! I came here from your link in the OEDILF forum, and I'm suitably impressed. :) I plan to use the widget code myself in a couple of places. Thanks for building it, and for posting it!

Aparna Ray said...

oh, this is really cool!