Home Wiki > SDB:Firefox custom search
Sign up | Login

SDB:Firefox custom search

tagline: From openSUSE


This article describes how to set up Firefox to use Google's custom search in the search bar. This gives you the power of Google to search within the wiki. However, now there is also a openSUSE wiki search plugin available for Firefox. This has the same behaviour as the wiki's search engine. (When page matches, you go there directly). Refer to external links below
Tested on openSUSE Recommended articles Related articles
Icon-checked.png

Icon-manual.png Icon-help.png

General

Using Google to search your web site is easy. Type in search field for instance, site:en.opensuse.org wireless and you have power of Google pointing to articles about wireless on this wiki. Though, there is a better way.

Thanks to Firefox custom search you can skip typing site:en.opensuse.org every time.

Setup

Look in /usr/lib/firefox/searchplugins and you will see number of files:

 
* amazondotcom.xml
* answers.xml
* creativecommons.xml
* eBay.xml
* google-opensuse.xml
* google.xml
* NovellCool.gif
* NovellCool.src
* NovellDocumentation.gif
* NovellDocumentation.src
* NovellSupport.xml
* opensuse-software.xml
* yahoo.xml 

Each <something>.xml correspond to one of search engines listed in top right corner search field starting with Google.

The google-opensuse.xml is the new one. It is edited copy of google.xml so it should not be a problem to create custom search. Here is one where new created search will act like you have typed in search field site:en.opensuse.org and then your search term.

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>openSUSE Wiki</ShortName>
<Description>openSUSE Wiki with Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:...
</Image>
<Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/comple
te/search?output=firefox&client=firefox&qu={searchTerms}"/>
<Url type="text/html" method="GET" template="http://www.google.com/search">
  <Param name="q" value="site%3Aen.opensuse.org+{searchTerms}"/>
</Url>
<SearchForm>http://www.google.com/</SearchForm>
</SearchPlugin>

There is skipped image data in section:

 
<Image width="16" height="16">data:...
</Image>

as it is a bunch of bytes that belong to icon image. You can leave Google icon, or incorporate openSUSE icon from opensuse-software.xml.


Here is final effect where you can see that you typed in top right wireless and Google actually received site:en.opensuse.org wireless and listed results.

Google-search-openSUSE.png

Back to Firefox | SDB:HOWTOs

External links

Firefox openSUSE wiki (en) search plugin