You are currently browsing the page Firefox search plugin for your website in the Miscellaneous category.

Firefox search plugin for your website

I haven't tested this on other browsers yet, but it works for Firefox 2. :) If you use Firefox, you certainly use the search field at the top right corner! If you click on your current search engine icon, you should see "Add search pootato.org" in the drop down list! You can find documentation about OpenSearch plugins on this page at Mozilla Developer Center.

If you want this for your website, you need... a search form! XD In your_website_title.xml file, paste this code:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>ShortName</ShortName>
<Description>ShortDescription</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">ImageData</Image>
<Url type="text/html" method="get" template="Site URL/?s={searchTerms}"></Url>
<moz:SearchForm>Search form page URL</moz:SearchForm>
</OpenSearchDescription>

Explanation for bolded parts

ShortName is for example, your website title.
ShortDescription is what will appear after "Add..." in the search engines drop down list.
InputIncoding is the encoding to use, you can leave UTF-8.
ImageData is an encoded version of your website icon. Usually, people use their favicons. Go to The Data: URI kitchen, check "base64" and upload your favicon or paste its URL. When you generate, you should have a code looking like this:

data:image/x-icon;base64,R0lGODlhEAAQAKIAANq%2Bd%2BbVsqF6OmVUOuzgzv% etc.

Replace ImageData by this code! :)

If you're a Wordpress user, you only need to replace Site URL by your URL without ending slash (I've already put it). Indeed, Wordpress search template is:

http://www.url.com/?s=search_term

So in the codes, we replace search_term by {searchTerms} :) If you don't use Wordpress, you need to find out your search template. Try searching something using your own search form and take a look at the url. If you have something like:

http://www.url.com/search/search_term/

Then your template should be:

http://www.url.com/search/{searchTerms}/

Search form page URL is to be replaced with your search form page URL. XD

Making it useable

Now, upload the XML file you created to your server. And between <head> and </head>, add this code:

<link rel="search" type="application/opensearchdescription+xml" title="Your site title" href="your_website_title.xml" />

We're done! :)

Print This Post Print This Post



Related Posts

Sponsors


8 Responses to “Firefox search plugin for your website”

Hey!
How do i create my own cool wordpress theme? Can you help me? or do you know where i can find a tutorial?

I totally love your site! :D it is just so cute! ^^

Bye! Louella


Omg that's so cool! I love it! Thanks so much for always posting about your neat findings. They help me out a lot. :D


O_O what happened to your portfolio site? Egosystem.Org??? Are you going to get a new domain for it? :'(


omg, thank you, i forgot to renew it XDD totally forgot!


It's ok with almost all the script but there is something that I don't get:
I have no Idea how to modify this line on php-fusion search engine:

It seams there are no search terms or even something like that.
I'll be very gratefull for Your help.


Sorry, this is the line:


Tried it out in other browsers out of curiosity. It does work in the newest version of IE but not in Opera.


[...] Firefox search plugin for your website | pootato.org try following that template. [...]


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It