SDB:Firefox custom search
Recommended articles
Related articles
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.
Back to Firefox | SDB:HOWTOs