Wiki Widgets
A classic case of yak shaving: too much work on anyway, decided to take a break by turning our local community site into a wiki. Then I thought it’d be nice to embed a Google map showing a few local landmarks. Must be possible, right? Well it probably has been done already but it seemed pretty simple (and an interesting diversion) to write a MediaWiki extension to allow maps to be embedded.
So then you need to let users add points to the map - so the map needs button that spits out a chunk of markup that can be used to add a point. So I wrote some Javascript to do that.
Of course one extension is never enough (just say no kids). I was writing a load of code that’d be useful in other extensions anyway. What about a framework for extensions? Yup, the dreaded ‘f’ word. Oh well.
Anyway, to cut a long story short: Wiki Widgets.
One of the things I wanted to do (you know, once it became a project rather than a displacement activity) was to make widgets that, from the user’s point of view, are discoverable. It’s all very well installing an extension but if users can’t find out about it they won’t use it. Wiki Widgets has a pretty simple take on discoverability: make a blank page and add the markup:
<widget />
to it. When you save or preview the page you’ll get a list of all the installed Wiki Widgets. For each Widget there’s a link that takes you directly to a (wiki) page that explains how to use it. From there you should be able to select the widget you want. Wherever possible I plan to make the individual Widgets support additional discoverability. For example if you add an empty Google Gadget Widget like this:
<widget type="googlegadget" />
you should get a user interface that makes it easy to add the gadget you want and set up its parameters.
Anyway, back to the day job now.

April 19th, 2007 at 10:11 am
ooo, I might have a use for this.
April 19th, 2007 at 11:11 am
Let me know if there’s anything you need :)
April 19th, 2007 at 2:34 pm
Don’t worry - if reading Flickr Hacks gets too difficult I’ll just present you with my problem ;-)
April 19th, 2007 at 2:51 pm
OK, write a Flickr Widget (or we can collaborate) and then we can release it is a Wiki Widget :)
April 19th, 2007 at 7:15 pm
Don’t wait up…
By the time I’ve finished real work programming as a hobby doesn’t feel like relaxation :(
May 13th, 2007 at 6:28 pm
This is ace. I’m going to set one up at work :)
May 13th, 2007 at 6:31 pm
Cool. Let me know if you have any requests for widgets.
I need to finish the GraphViz widget and I’m also playing with a general purpose ‘filter through external command’ widget.
Oh and if it ends up being a public site let me know where it is so I can add it to the list of sites using Wiki Widgets :)