How to Create OpenSearch Plugins?

browser search plugin
browser search plugin

OpenSearch is a collection of simple formats for the sharing of search results.

OpenSearch description file

https://www.svnlabs.com/opensearch.xml

We have to create  a simple xml file for websites and search engines to publish search results in a standard and accessible format.

See below the code in action…….

<?xml version=”1.0″ encoding=”UTF-8″?>

<OpenSearchDescription xmlns=”http://a9.com/-/spec/opensearch/1.1/”> <ShortName>svnlabs</ShortName>

<LongName>svnlabs – Concentrate > Observe > Imagine > Launch</LongName>

<Description>Search through articles posted on svnlabs.com</Description>

<InputEncoding>UTF-8</InputEncoding>

<OutputEncoding>UTF-8</OutputEncoding>

<AdultContent>false</AdultContent>

<Language>en-us</Language>

<Developer>svnlabs</Developer>

<Description>svnlabs – Concentrate – Observe – Imagine – Launch svnlabs, Linux, Apache, Mysql, PHP, Video Encoding, Youtube API, Facebook API, Twitter API, Amazon Web Service, OSCommerce, Joomla, WordPress</Description>

<Tags>svnlabs Linux Apache Mysql PHP Video Encoding Youtube API Facebook API Twitter API Amazon Web Service OSCommerce Joomla WordPress</Tags>

<Attribution>Search Articles on svnlabs, https://www.svnlabs.com/</Attribution> <SyndicationRight>open</SyndicationRight>

<Query role=”example” searchTerms=”India”/>

<Image height=”16″ width=”16″ type=”image/vnd.microsoft.icon”>https://www.svnlabs.com/favicon.ico</Image>

<Image height=”130″ width=”130″ type=”image/jpeg”>https://www.svnlabs.com/sv.jpg</Image>

<Url type=”text/html” template=”https://www.svnlabs.com/blogs/?s={searchTerms}”/>

</OpenSearchDescription>

Paste below block of code to HTML Heading section to add browser search plugin….

<link rel=“search” type=“application/opensearchdescription+xml” href=”https://www.svnlabs.com/opensearch.xmltitle=“svnlabs blog search” />

Source:
https://developer.mozilla.org/en/Creating_OpenSearch_plugins_for_Firefox