You can do this today, like in 10 minutes...
OpenSearch is a format for describing how your site is searched, and optionally for adding Search elements to other formats like RSS.
Auto-discovery of OpenSearch description documents is done via a link in your HTML head like so:
<link rel="search" type="application/opensearchdescription+xml" title="My Site" href="http://www.mysite.com/open-search.xml" />
The OpenSearch xml document is interpreted in the browser to add extra search providers in the integrated search function as so:
The contents of the file can be short or it can be long. A bare bones example may be as simple as this:
<?xml version=”1.0” encoding=”UTF-8”?><OpenSearchDescription> <ShortName>My Site</ShortName> <Description>Search My Site</Description> <Url type="text/html" template="http://www.mysite.com/search.aspx?terms={searchTerms}"/></OpenSearchDescription>
The spec gives another simple, and one much more detailed example document. The IE blog also goes into some detail... but in true internet fashion, View Source is the quickest path to an example
Security?
The bad news is, as of current browsers at time of writing (IE 7.0.6000.16473, Firefox 2.0.0.4) it seems controls are quite lax around what search template you can include, I had no problems setting the URL in the search template as being a completely different site!
While it would be completely hilarious to posion someone's search bar as a prank with the following three facts...
DasBlog
Tangentally, If you are looking for the file to edit to add a new link url to a dasBlog site it is:
\dasblogce\themes\*\homeTemplate.blogtemplate
Listening To: Sonic Youth, Daydream Nation
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2008, James Green
E-mail