Digitizing New Zealand

Fellow Kiwifoo camper Jo Eaton was in town on the weekend, spreading the good word about their mission to index all New Zealand’s digital content, and make the data available via their new developer API’s, with a travelling “Hackfest”. Fortunately It wasn’t too far for me to walk to take part – it was upstairs at CII, where Interclue is located.

Among the various hacks there was an iPhone app and a Drupal module, and I got most of the way through building a Search Plugin for Firefox and IE, which is a relatively trivial hack in theory but I’d never built one before so it was a useful learning experience.

Unlike fully blown browser extensions such as Interclue or Lazarus, search plugins are just an xml file that when loaded using a special javascript method (only available in certain browsers, such as Firefox 2+ and IE7+) will cause your browser to create another search provider for the search box, which by default in Firefox only has a few general purpose search engines such as Google and Yahoo available, and a few site specific ones such as Wikipedia. But anyone can create a new search plugin for the search on their website, and getting users to install it can mean that they come back to your website more often.

I found a few little niggles, such as that the xml file had to be served up with the right MIME type by the webserver, and that the best way to provide the icon was using a “Data URI” – essentially a way of encoding an image using text. Fortunately Hixie has a kitchen for that.

My attempt is here, and in theory it should install fine in IE7+ and Firefox2+ by clicking the link on this page, but so far, it doesn’t, and I’m not quite sure why. I’ll update this post once I’ve fixed it! [update: fixed]

DigitalNZ has a “roll your own search engine” system set up for their growing collection of Digital Kiwiana, and it should be simple enough to extend that system to build a search plugin for each derived engine, since they will share the same pattern apart from the target URLs. There are also standards for search completion (guessing what you want to search for) and autodiscovery. I’ll make another post in a couple of days once I’ve had a chance to figure it out properly.

[updated because I forgot their mission was only to index the metadata, the digitizing and putting online bit is up to the contributors and partner organizations]

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment