[Beginner] Add a search engine to a users toolbar (IE & FF)


(Tavernerj) #1

Not quite Matrix specific, but may be of use to others :wink:


OK, for this tutorial we’ll add a search engine to a users toolbar (works in IE & FF), where a user only needs to click a link to add an engine. This uses the OpenSearch spec @ OpenSearch.org

.



Firstly we’ll need an XML file, in this case I’m using Google Scholar.

[codebox]<?xml version=“1.0” encoding=“UTF-8” ?>

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

<ShortName>Google Scholar</ShortName>

<Description>Stand on the shoulders of giants</Description>

<Url type=“text/html” template=“http://scholar.google.com/scholar?q={searchTerms}” />

<Image height=“16” width=“16” type=“image/x-icon”>http://scholar.google.com/favicon.ico</Image>

</OpenSearchDescription>[/codebox]



I guess you could just upload a file, or if you have like I have setup a “blank” design, just create a standard page with the above code & setting the Style Information & Content Type to raw HTML.



Next you need to have a page to launch it from, with the required code:

    Add the Google Scholar Search

Where 987654321 would be your asset ID of the XML file, aye :wink:



Microsoft (blah, blah, blah, yuck :stuck_out_tongue: ) has a tool to generate the OpenSearch XML file automajiclly, however I found it to be less than perfect. Just make sure there’s nothing left after the {searchTerms} in URL template attribute.



Now, how to get it to work in Safari, hmmmm. :blink:’ /> <img src=‘http://forums.matrix.squiz.net/public/style_emoticons/<#EMO_DIR#>/dry.gif’ class=‘bbc_emoticon’ alt=’<_<


(Dw Andrew) #2

That should also work with opera. Won’t have any luck with safari…until they add in the support :frowning: you could use inquistor but it’s nowhere near as simple!