After 9rules released their comprehensive new search feature on Monday, allowing users to search member content and receive results from Flickr, YouTube and Technorati, it was only a matter of time before someone created a Firefox search plugin. This got me thinking that it would be pretty cool if PaulStamatiou.com readers could have that same convenience. Well now you can, and I’m going to show you how to make one for your WordPress-powered blog as well.
The Mycroft site, which stores a repository of Firefox search plugins, has a basic outline of how to make a working plugin. However, to get it working with WordPress you will need to change a few items. First off, every search plugin has two parts: the source file, which is converted to XML once you upload it to Mycroft, and search image. I’m not sure what image file types the search plugin can take but it seems to work well with GIF’s and PNG’s. Both of these files must be named the same, with the exception of the file type. For example, my files are named PSsearch.gif and PSsearch.src.
The main thing that needed to be changed for WordPress compatibility was the search query which goes by index.php?s= instead of using query. Below is the code I changed from the Mycroft tutorial; the rest of it stayed the same.
name=“PaulStamatiou.com Search”
description=“PaulStamatiou.com – Tech News/Reviews/Guides”
action=“http://paulstamatiou.com/index.php”
searchForm=“http://paulstamatiou.com/index.php”
method=“GET”
>
<input name=“sourceid” value=“Mozilla-search”/> /* for some reason WordPress insists on putting the ending slashes */
<input name=“s” user/>
<browser update=“http://mycroft.mozdev.org/update.php/id0/PSsearch.src”
updateIcon=“http://mycroft.mozdev.org/update.php/id0/PSsearch.gif”
updateCheckDays=“7″
>
When you’re done with that, submit your plugin with this tool. Once everything is uploaded, do a quick search on Mycroft to find your plugin and install it. That being said, go ahead and try out my search plugin. I decided to convert my site’s favicon and use it with the search plugin for consistency. Overall I think it turned out quite well for something that took me a few minutes of work. A great addition to any blog.

Alternatively, you can host the search plugin on your site using JavaScript and a properly constructed link as done on UNEASYsilence in the sidebar.
Tweet This
Stumble This


{ 8 trackbacks }
{ 12 comments… read them below or add one }
I just tested it and it seems to work in Flock as well.
More from author
Great tutorial, Paul. Too bad I couldn’t have used it for the 9rules Search plugin. I had to go through Mozilla’s horribly confusing documentation on how to create a plugin. Oh well, if I wouldn’t have suffered through creating the plugin, this tutorial wouldn’t exist. At least future search plugin creators can enjoy the simplicity of your tutorial.
More from author
Thanks for even giving me the idea to make one. =)
More from author
Hey guys, if you’re looking for a more in-depth tutorial on how to write these things from scratch, I put together a long tutorial over at BusinessLogs.com back in February 2005 that talks about the ins and outs, code, XML, the whole enchilada.
More from author
Might have to link back to this – Thanks for the nod!
More from author
For the less coordianted among us, there is a good plugin for all this here
More from author
Paul – as always you rock! I’ll be making one for my site later today. Thanks!
More from author
Paul, you made it on TUAW twice in one week, nice!
Do these work for Flock too, or is there an extra step to make them compatible? And what about Firefox 2.0? Are there any compatibility issues there?
More from author
Thats cool info man i would love to play with it.Make some search site tool for our college website.
More from author
Thanks for the tip,
I prefer Quick Search on Firefox rather than the search box
More from author
Wow, thanks for this nice simple explanation. I gave up looking through the Firefox /Mozilla page on plugin development. This is great. I’m going to give it a try for my Level1Diet site, which has almost a million pages.
By the way, I created an XML version to search my big online database in MSIE 7.0 with their tool that adds a search. Seems to work fine in Explorer 7.0 (but not for earlier versions of course). Can it work in Firefox, with some modification?
More from author