Additionally, it contains a tag which renders the necessary markup allowing search clients like modern browsers to discover your on-site search facility. Visitors can easily add the site search to their browser’s list of search providers.
Place this tag somewhere into the
<head>...</head> element of your site to add an OpenSearch auto discovery link:
In case your Textpattern site search is not handled by the “default” section and its page template, you’d have to specify the URL of the search section, starting at your Textpattern root folder (omit any leading slash):
<txp:wet_opensearch_link searchurl="search" />
Finally, there are two attributes supporting branding. One is used to specify a 16 × 16 pixel icon, while the other designates a 64 × 64 pixels PNG avatar (though I’m not really sure where this will be visible…). The specs say a browser would expect a fully qualified URL here, and so does this plugin.
<txp:wet_opensearch_link favicon="http://www.example.com/myicon.ico" avatar="http://www.example.com/smiley.png" />
|searchurl||A path starting at your site’s Textpattern root which displays search results.
If your site uses the default section to list search term hits, leave this empty.
If you employ a special section like
|favicon||The URL of a 16 × 16 pixel icon for your site.||
|avatar||The URL of a 64 × 64 pixel PNG image for your site.||None|
This plug-in is released under the Gnu General Public Licence.
Get it here: wet_opensearch.txt.
Resources and Relateds
Express your suggestions, report bugs and discuss enhancements in this thread in the Textpattern forum.
This plugin was inspired by DeWitt Clinton’s post Add OpenSearch to your site in five minutes.
|2007-02-10||0.1||Initial public release|