Welcome! Log In Create A New Profile

Advanced

[MOD?] OpenSearch

Posted by microfly 
[MOD?] OpenSearch
May 15, 2009 05:03PM
Hi all,

I dont know if it is a mod, but it is something I like. I'm talking about the little search box in the right upper corner of FireFox (it also work in IE). The goal is to have your sphider search engine in this little search box.

First create a new xml file : mySearchEngine.xml in the root folder of your sphider install (pathToSphider)
(rem : replace "ht tp" with "http" in the second line)

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="ht tp://a9.com/-/spec/opensearch/1.1/">
<ShortName>nameOfYourSearchEngine</ShortName>
<Description>descriptionOfYourSearchEngine</Description>
<Url type="text/html" template="pathToSphider/search.php?query={searchTerms}&amp;search=1" />
</OpenSearchDescription>

Then edit the footer.html file from your template :
add this before </body>

<form action="#" method="post" onsubmit="window.external.AddSearchProvider('pathToSphider/mySearchEngine.xml')">
<input type="submit"
value="AddSiteToMySearchEnginesButton" />
</form>

where
pathToSphider = the full path (with "http" ) to your search.php script
nameOfYourSearchEngine = a short name for your search engine
descriptionOfYourSearchEngine = describe your search engine
addSiteToMySearchEnginesButton = text wich will be in the button

That's all

When you load your search.php page and click on the new button "addSiteToMySearchEnginesButton", FireFox ask you to add your search engine, then you may choose it in the little searchbox.

More info for OpenSearch here : [www.opensearch.org]



Edited 2 time(s). Last edit at 05/15/2009 05:07PM by microfly.
lex
Re: [MOD?] OpenSearch
June 04, 2009 05:31PM
awsome thanks man gona test it know
Sorry, only registered users may post in this forum.

Click here to login