![]()
Here’s a short guide to help you make and set up a search plugin for firefox and Internet Explorer 7 (a search engine of your site to add in the search engine field near the adress bar of your browser), with auto discovery and link to install it easily.
It’s based on opensearch specifications and is really simple to implement and install.
The plugin file is a simple xml file with the fellowing lines :
The declaration :
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
A short name for your engine (which will appear in the engine list) and a description :
<ShortName>Search Ayozone</ShortName> <Description>Make a search on ayoli's blog</Description>
The input encoding (mostly depends of your site encoding) :
<InputEncoding>UTF-8</InputEncoding>
Url of your site icon :
<Image height="16" width="16" type="image/x-icon">http://ayozone.org/favicon.ico</Image>
And the most important, the url of your search engine with the query param (”s”) in my case and the variable {searchTerms}. Note that only the get method will work with IE 7 :
<Url type="text/html" method="GET" template="http://ayozone.org/?s={searchTerms}"></Url>
Finally, we close the first tag :
</OpenSearchDescription>
Done
Then save the file with a .xml extension and upload it to your website.
Now to have the auto discovering thing (which shows “Add Search Ayozone” in the search engines menu when it’s not installed) just put this in your header with the url of your xml file :
<link rel="search" type="application/opensearchdescription+xml" href="http://ayozone.org/ayozone-search.xml" title="Search Ayozone" />
And you can also put a link that magically launches the search engine installation process like this
(again replace the url of the xml file with yours) :
<a href="#"
onclick="window.external.AddSearchProvider('http://ayozone.org/ayozone-search.xml')" >
Add ayozone search to your browser !</a>
Which looks like :
Add ayozone search to your browser !
Ressources :
» opensearch specifications
» mozilla developers docs

english
français
No Comment
Leave Your Comments Below