Archive for category Uncategorized

Custom Yahoo! Site Search for Firefox Searchbar

Last year I posted a brief tutorial on how to add a custom Google site search to the Firefox search bar. I still use Google, but Canonical has recently signed a deal to make Yahoo! the default search engine in Firefox (although it is very easily changed to whatever you prefer) so I figured I could do the same tutorial for Yahoo! for those who prefer the new default.

Everything is the same as before except for the <os:Url> tag (I also changed the name since I still had both searches present).

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Ubuntu Forums Yahoo! Search</os:ShortName>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD
/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gUYBy8UWHdfBwAAAcJJREFUOMuVk09IVFEUxn
/nNb7pkbV7r4jQQHKTbQya2rSxJJmoRbYLEqZl0MJolataFkW4k0ebmDaVCD4EEQdsEW+aTRuxdKGDCDMuhJjxNWN5WnjHzHkqntW958
/lu993PjhEhHjDId5iiHerkZO9mjXjtADdwGVgY+lLcqo0a3835ekU5R6ARNNg7uxRqmsOo
/UscKORb79Se1SatceBa0A2FoEqwoQ7jeocn6ojwFfAMuUa8LRWkYVkqy6LHxWaHwjcAeAt8AfdvMDoegewCnjAfeCOaS0C58WPKvIPutvKOvPAKYQVNqRbbpdLu3gZAR6Y65D40XNLM067ZpxBwnonEJm
/PN49bOIZUDfn3gaJH4GLzNe/0dXyBpFXbOpMnDLiR0XNOPeADuBXrAoHRd4/vuMWkTDE9HPOziHyAQBLrgLvYxapDXgH2MBn4LUlfrQkfvSSlP0DcLawygsd807GABgywwCTB8qYv3lkXxlTlCt7LlI
+bcUuUuKELvz+KcspyoUmEkVQzR3ro7rmQDK7YxjgyaVAr29JqQ9JU9jXTCHef2Y6M6BTp++ybSZJr/YcVkE0cIc1cBc1cLft/BckXKkAO9v5fAAAAABJRU5ErkJggg==</os:Image>
<os:Url type="text/html" method="GET"
template="http://search.yahoo.com/search?n=10&amp;ei=UTF-8&amp;va_vt=any&amp;vo_vt=any&amp;ve_vt=any&amp;vp_vt=any&amp;vd=all&amp;vst=0&amp;vf=all&amp;vm=p&amp;fl=0&amp;fr=yfp-t-893-s&amp;p={searchTerms}&amp;vs=ubuntuforums.org">
</os:Url>
</SearchPlugin>

There isn’t much to it, but I’ll go ahead and give a quick run through of the tags and then all you need to do ti make your own is just plug in your own values to make your own.

The <SearchPlugin> and </SearchPlugin> begin and end the code block which contains the search engine information. TheĀ xmlns=”http://www.mozilla.org/2006/browser/search/” xmlns:os=”http://a9.com/-/spec/opensearch/1.1/” part in the opening tag is the namespace to tell Firefox what we’re doing.

<os:ShortName> and </os:ShortName> enclose the name which will appear in the searchbar menu.

<os:Image> and </os:Image> enclose the icon which appears beside the searchbar input, I have used the Ubuntu icon for this example.

<os:Url type=”text/html” method=”GET” template=””Search engine search string{searchTerms}&amp;’site search string’='url of site to search’“>
</os:Url>
The os:Url tag is what tells firefox what search engine to use, how to use is and what site to search for a site search.

‘template’ is the search UrlĀ  with {searchTerms} in a place of the search string.This is where Firefox will insert the string entered into the searchbar.

This is the searchbar:

ufy3

and the results:

ufy2

Take a look at https://developer.mozilla.org/en/Creating_OpenSearch_plugins_for_Firefox for more information.

No Comments