I've added a few more search engines to Firefox, and I'm parking them here so I can easily transfer them to my other machines.
Here's the procedure create these plugins, by the way:
Capture the image. To do this I fetch the favicon.ico file from the site's root, and use ImageMagick to convert it to a GIF.
Write the control file. For example:
<search name="Feedster" method="GET" action="www.feedster.com/search.php?btnG=Search&sort=date"> <input name="q" user> </search>The action is the query URL minus the query parameter, in this case "q" -- it goes separately as part of the <input> tag. When a site uses POST instead of GET, you'll need to dig a bit deeper to come up with the query string. I used to use the LiveHTTPHeaders extension. Even better, though, is Chris Pederick's wonderful Web Developer Extension which does all kinds of handy things, including converting between GETs and POSTs.
To add a plugin, just drop a pair of these files -- the image and the control file -- into Firefox's searchplugins directory. The additional step I'm illustrating here -- one-click installation of the plugin -- depends on a snippet of JavaScript:
function addEngine(name,ext,cat) { if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) { window.sidebar.addSearchEngine( "http://jonudell.net/udell/gems/"+name+".src", "http://jonudell.net/udell/gems/"+name+"."+ext, name, cat ); } else { alert("Netscape 6 or Mozilla is needed to install a search plugin"); } }
Note that there's a registry of these plugins. And I should probably register the Safari plugin there. But I'm sure this blog isn't searched often enough to warrant registering a "Jon's Radio" Firefox plugin. For such cases, it's nice to know that a more decentralized, ad-hoc solution is available.
Update: One reader wondered where the search plugin dropdown list is hiding. In plain sight. Though I'll agree it's easier to miss than Safari's equivalent, which remembers search history. Hmm. Would it make sense to offer both funtions? One handle to drop down the list of engines, and another to drop down the recent searches for that engine. Nah. Too cluttered, probably.
Former URL: http://weblog.infoworld.com/udell/2004/03/11.html#a942