12 Feb

Search Engine Plugins

written by Adam No Comments posted in News

I’m sure most of you know about the integrated search bars in Firefox and IE7 – Just select the search engine you want to use and enter your search. You can also create new plugins for any site you want. For example, right now I have Notebookforums, strafeRight forums, 5 different STEAMID lookup searches, YouTube, and a couple more to go along with Google and the other default engines.

Both browsers take advantage of the OpenSearch format to create the plugins. OpenSearch plugins are simple to create and use. You can either use the search string from the actual site you want, or you can use Google and make it only search the site you want. I prefer using the actual site that I want to look at. If you have your own site you can use autodiscovery so everyone can use your plugin. When you set up the autodiscovery, when you go to your site it will have Add "Your Search Here" below your other plugins in the search drop down box. Just select it and you are ready to go.

I got started working with OpenSearch when someone on Notebookforums wanted to search a site. I decided to give it a try and it worked, so I made a few other ones. They are easy to create once you have done a few, and even easier if you have a basic template to start from. The last plugin I created was to look up STEAMID’s from CAL, ESEA, and a few other sites. Here is an example of what the CAL Search plugin looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>CAL SteamID</ShortName>
<Image width="16" height="16" type="image/x-icon">http://www.caleague.com/favicon.ico</Image>
<InputEncoding>UTF-8</InputEncoding>
<Url type="text/html" template="http://caleague.com/?page=history&type=roster&uniqueid={searchTerms}" />
</OpenSearchDescription>

When you select the CAL STEAMID search and enter your query, it will replace {searchTerms} with whatever you entered, for example 0:1:3219890, bringing you to the CAL page showing you my STEAMID history. There are quite a bit more options and features you can use, but for the basics this will work. (I use a base64 encoded string for the icon image, however I don’t want to break the page, so I entered it this way.) To use your plugin you’ll need to upload it to your site and add the following to your template header:

<link rel="search" href="CAL-Search.xml" title="CAL STEAMID"
type="application/opensearchdescription+xml" />

Now when you navigate to your page it will find you search plugin and you are able to add it from the drop down list.

If you have a site that you want a search made for, let me know and I’ll make one for you when I have a few minutes to spare. Or if you make your own but do not have any webspace, I’ll host it on mine for you and others to use. For more information head over to the OpenSearch home page.

Tags:

No Responses to “Search Engine Plugins”

Leave a Reply