We have an internal application we use to enter/view/manage bugs. Not that we have any bugs of course. A bug is identified by a bug number, which can be supplied to our bugdb application and the relevant bug text displayed. Of course you can perform many more complex and combined forms of queries but the simple 'can you check this bug please' usually results in the simple bug number type of query.
It struck me that it'd be cool to somehow add our bugdb application as a search engine for Mozilla. So I could just enter the bug number in the search field and press enter, without needing to go to the actual bug application first.
Yes, I know. I must be really, really lazy.
I thought it'd be hard. I thought wrong. Those Mozilla people, what enablers!
If you look in the $MOZILLA_HOME/searchplugins directory, you'll probably see a bunch of files. The files ending with .src define a search plugin.
Looking at one of the .src examples, you can pretty easily see how it works.
For my bugdb search I really just needed to specify the URL of the bugdb application and specify the name of the query parameter it uses.
name="Oracle Bug DB"
description="Oracle Bug DB"
<input name="c_rptno" user>
You then save this as a .src file into the searchplugins directory, restart Mozilla and bango! you have a new search option.
How easy can it be!
I then hunted around and found some doc off the Mozilla website which actually explains how it all works. Good job Mozilla folks.
Now of course this is for our internal application, so it won't for you folks out there. But if you ever wanted to add a new option to the Mozilla search engine list, then try it out. No code required!