Quite often trying to add a search engine to Firefox I end up dissatisfied not able to find the particular search engine or service I am looking for. Compare this to Opera which allows you to create your own search in a snap by just right clicking on the search box that you want to add and clicking create search. There is a workaround for this with Firefox also, however its just a bit more daunting. So I decided to create a Step by Step tutorial on how to do one.
Prerequisites
- Firefox web browser
- A little bit of XML knowledge (Don’t worry if you dont, this tutorial will help you out)
Deliverable
- A Search plugin added to the search box on the upper right corner of Firefox
Procedure
Step 1: Identify the search website or the search service for which you want to create the plugin. In this tutorial we will create a search plugin to search torrentz.com a site useful for searching Bittorrent files.
Step 2: Open torrentz.com and just search for a random term. Lets say we search for "abczyz". Type "abcxyz" in the search bar and press enter. Ofcourse this won’t return many results but what we want is the URL(Uniform or Universal Resource Locator or the thing in the address bar of the browser)
The URL we get is http://www.torrentz.com/search?q=abcxyz
Needless to mention that this can change with time and will be different for different sites.
Step 3: Open notepad or any editor you like but not a word processor like Microsoft Word. Copy and paste the following code into the file:
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Name</os:ShortName>
<os:Description>Description</os:Description>
<os:InputEncoding>encoding</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,data</os:Image>
<os:Contact>email of whom to contact<os:Contact>
<os:Url type="text/html" method="GET" template="webAddress={searchTerms}">
</os:Url>
</SearchPlugin>
Step 4: We will be changing the text that is in bold in the above code to suit our needs. Leave the first two lines as it is. They tell the type of the document and the name space description.
- The text included between the
<Shortname>
and </Shortname>
is the name you want to give to your search plugin. We will put "Torrentz" here.
- The text between the
<Description>
and </Description>
gives a little information about the plugin. We will put "Search torrents on Torrentz.com"
in this area.
- Replace
encoding
with the type of input encoding you will use, if you dont know what is this, then you will most probably be using UTF-8 so put in "UTF-8"
there.
- The image part is just a bit tricky so if you don’t get this you can skip this tag (you just won’t get an icon, thats it no big deal).What you have to do is go to the URI Kitchen, then choose and upload the image that you want to use as the icon for the plugin and click generate. Just copy everything that it gives and place it between
<os: Image width="16" height="16"></os:Image>
<Contact>
and <Contact>
enclose the email address of the mantainer of the plugin. We put "sendinfofiles@gmail.com"
here.
<Url>
is to contain what we had discovered and taken note of in Step 2. Replace the word webAddress with the url we found in Step 2.
So the <Url>
line should read <Url type="application/rss+xml" template="http://www.torrentz.com/search?q={searchTerms}"/>
- Click here to view the final file. Feel free to download and make changes.
Step 5: Thats it. Thats your very own Firefox search plugin. Did I miss something? If you were thinking "So how you use it or test it?" then pat yourself on the back, it seems you understood the tutorial! For the others please have another look at Step 4.
Coming to the point, to test it you have to place it in special directory where the Firefox plugins are placed. This differs for different operating systems. So have a look at the following table:
- Windows 2000/XP –
C:\Documents and Settings\user name\Application Data\Mozilla\Firefox\Profiles\string\searchplugins
- Windows Vista –
C:\Users\user name\AppData\Roaming\Mozilla\Firefox\Profiles\string\searchplugins
- Windows 98/ME –
C:\Windows\Application Data\Mozilla\Firefox\Profiles\
- Macintosh (OS X) –
~/Library/Application Support/Firefox/Profiles/
- Linux/Unix –
~/Library/Application Support/Firefox/Profiles/
Please note that you will have to enable "Show Hidden Files", user name refers your Windows username, string is a random string generated for each firefox profile. Just open up these folders it will start making sense.
Step 6: You are now ready to go, Restart Firefox if it was already running and then choose your newly created plugin from the Search Box and test it. It works I know. You are a genuis!
Step By Step Tutorial Details:
- Time for completion: 5 – 10 minutes.
- Difficulty level: Moderate – Difficult
- Karma, Satisfaction or Joy you gain: 8/10
Bonus: Did I mention this plugin can work with Internet Explorer 7 also? Yes it can. IE7 supports Open Search Plugins and thats what we just created incase you didn’t notice!