Home > Fluid Dynamics Search Engine > Help > 1085

Searching secondary search engines

This article describes how to allow your visitors to search different search engines from the FDSE results page.

Search results with secondary links

To enable these secondary links, begin by editing the footer template at:

	search/searchdata/templates/footer.htm

The default footer contains the following HTML:

<div align="center">

	<hr size="1" width="50%" />

	%copyright%

</div>
</body>
</html>

Insert the following HTML before the divider:

<div align="center">

<% if terms %>

<p>Try your search for "%terms%" at:<br />
[
<a href="http://www.google.com/search?q=%terms_url%">Google</a>
	|
<a href="http://www.altavista.com/search?q=%terms_url%">Altavista</a>
	|
<a href="http://www.ask.com/main/askJeeves.asp?ask=%terms_url%">Ask Jeeves</a>
]</p>

<% end if %>

	<hr size="1" width="50%" />

	%copyright%

</div>
</body>
</html>

This will cause links to appear in the footer when the user has entered search terms.

Major search engines occasionally change their syntax. To find out what link to use, go to the search engine, perform a normal query, and then copy the resulting URL (i.e., www.google.com/search?q=test). Replace your search term with the variable %terms_url% and then paste the URL into the template, as in the above examples for Google, Altavista, and Ask Jeeves.

History: this technique will work with FDSE version 2.0.0.0054 and newer. Those versions contain support for the required %terms_url% variable.


    "Searching secondary search engines"
    http://www.xav.com/scripts/search/help/1085.html