- MAXIMUMpcguides Windows Vista - http://maximumpcguides.com/windows-vista -
Create a Custom Search Provider for Your Website in Internet Explorer 7 Search Box
Posted By Brent Trahan On October 26, 2006 @ 10:53 am In All, Internet Explorer, Windows | 2 Comments
This guide shows you how to create a custom search provider for people to search your site with your preferred search engine from Internet Explorer 7’s search box. This feature will be available while people are surfing your site or they can add your custom search provider to their IE7 search box permanently so they can search your site at any time.
Internet Explorer 7 brings a new search feature to the table. Now you can search the net from a search box located in the top right of the IE7 window. By default you can search the Live.com search engine for content on the web.

You can add your preferred search engine(s) by clicking the down arrow to the right of the search box, then click Find More Providers.
Webmasters can take advantage of this new feature and add a custom search provider to the IE7 search box that searches their site with a preferred search engine from the IE7 search box. When a custom search provider is added to a site the down arrow of IE7’s search box turns orange while people are surfing the site.
The surfer can use the custom search provider by simply clicking the orange drop down arrow and select your site’s custom search provider. A surfer can also install your custom search provider by clicking the orange drop down box; select add custom search providers, then select your custom search provider.
You’ll need a <link> tag just above the </head> in every page you want IE7 to notice you have a special search provider for your site and a specially formatted OpenSearch XML file that tells IE how to search your site from its search box.
Lets get started.
Place the <link> tag (example shown below) in the <head> of your website. You need to change everything in red to reflect your site. This tag will point IE7 to your OpenSearch XML file.
<link title="Search Provider Name" type="application/opensearchdescription+xml"
rel="search" href="Location of OpenSearch XML Document">
An example of the <link> tag above is:
<link title="MAXIMUMpcguides Google Search" type="application/opensearchdescription+xml"
rel="search" href="http://www.maximumpcguides.com/iesearch.xml">
Before you go any further you need to search your site with your preferred search engine with the word TEST like so:
site:maximumpcguides.com TEST
Copy the address of the results of your search and save them to a text document. You’ll need that later.
To create the OpenSearch XML file that tells IE7 how to search your site copy the code below and past it in Notebook. Make sure you change the code in red to reflect your site.
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Search Provider Name</ShortName>
<Description>Long Search Provider Name</Description>
<InputEncoding>UTF-8</InputEncoding><Url type="text/html" template="SearchQuery"/></OpenSearchDescription>
Replace Search Query in the code above with the address of the search results you copied earlier. Replace TEST in the copied address with {searchTerms}.
An example of the above code is:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>MAXIMUMpcguides Google Search</ShortName>
<Description>MAXIMUMpcguides Google Search provider</Description>
<InputEncoding>UTF-8</InputEncoding><Url type="text/html" template="http://www.google.com/search?q=+site%3Amaximumpcguides.com+{searchTerms}"/></OpenSearchDescription>
Save the Notebook document as an XML file by clicking Save as, change save as type to all files, name the file something like iesearch.xml and click save. Make sure you add .xml behind the name of your file.
Upload the XML file to the location you specified in the <link> tag.
Test your custom provider to make sure it’s working.
If you need more help with creating a custom search provider see [1] Microsoft’s how-to.
Article printed from MAXIMUMpcguides Windows Vista: http://maximumpcguides.com/windows-vista
URL to article: http://maximumpcguides.com/windows-vista/create-a-custom-search-provider-for-your-website-in-internet-explorer-7-search-box/
URLs in this post:
[1] Microsoft’s how-to: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/external/overview/ie7_opensearch
_ext.asp
Click here to print.
Copyright © 2008 MAXIMUMpcguides Windows Vista. All rights reserved.