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]


About the Author

@sethop is an Internet Technologist, Start-up Founder, Systems Architect, Disruptive Innovator, Technoprogressive, Truthseeker, Freethinker, Altruist, Moderate, Kiwi, Geek.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

The Author
Seth Wagoner is CEO and Geek in Chief at Interclue.

Interclue is our popular Firefox add-on. UltimateStatusBar is our similar but much more lightweight add-on for Safari.
We also make the "life-saving" Lazarus: Form Recovery for Firefox, Safari and Chrome.
Mail: Seth AT sethop D0T com
The idyllic scene atop my blog is the view from my parents' place in Kaikoura, New Zealand. They rent out the upper floor apartment. It's not expensive to stay there, and I can sometimes even arrange mates rates if you ping me before booking yourself in.