Gossamer Forum
Home : Products : Links 2.0 : Customization :

Querying other Search engines with 2.0

Quote Reply
Querying other Search engines with 2.0
 
Hi everybody,

I have upgraded links 1.1 to 2.0, but retained the old site_html.pl,
as I find the CSS very confusing. I had implemented a mod based on a posting
by "wirthit" sometime back. It was to associate links search queries
to other search engines.

I tried it and it worked on 1.1..After the upgrade, the query keywords do
not seem to attach itself to the searches on other search engines..

I remember the posting mentioned adding a line of code to the search.cgi, I
guess this could be the problem, because the new search.cgi looks totally different.

I'd be glad if you could tell me where I am going wrong..

Thanks,
Joe


I've pasted the code below (from the old posting) :
===========================================
wirthit
posted February 07, 1999 03:55 PM PST


not sure if this is what you are looking for it was written by Craig Antill (Sorry Craig if I spelt that
wrong.)

Introduction
This is a modification to Gossamer Threads' Links Engine 1.1 which I was asked to implement on a
site I was working on. It is a pretty straightforward mod which will allow you to show a 'now search
these engines...' feature.
It allows that when a search on the database is made, either successful or not, that the user is
presented with the option to carry out a further search on various other search engines. This is
similar to the option you have on Yahoo! after a similar search.

--------------------------------------------------------------------------------


Instructions
First of all, do the sensible thing - BACK ALL YOUR FILES UP!!! this includes all files in /links and
/links/admin. I can't, and won't, be responsible for any errors - self induced, or otherwise - which
result from this modification...

--------------------------------------------------------------------------------

Open search.cgi and make the following changes:
In sub main, follow this section:

# Boolean connector defaults to "and".
if (!$in{'bool'}) { $in{'bool'} = 'and'; }

Add this:
# Stores the query in $term seperated by a +
$term = $in{'query'};
$term =~ tr/ /+/;

--------------------------------------------------------------------------------

Open site_html.pl and make the following changes:
Add these lines to sub site_html_search_results where you wish it to be output:

Now Try This Search On:
<BR><BR>
<A HREF="http://www.infoseek.com/Titles?qt=$term">Infoseek</A> |
<A HREF="http://www.altavista.digital.com/cgi-bin/query?q=$term">Altavista</A> |
<A HREF="http://search.yahoo.com/bin/search?p=$term">Yahoo</A> |
<A HREF="http://search.excite.com/search.gw?search=$term">Excite</A> |
<A HREF="http://www.hotbot.com/?MT=$term">Hotbot</A> |
<A
HREF="http://www.lycos.com/cgi-bin/pursuit?matchmode=and&cat=lycos&query=$term">Lycos</A>

Finally, add these lines to sub site_html_search_failure where you wish it to be output:
Search Again? Use the search form below to search the $site_title database, or select any of these
fine search engines to search their more general databases
<BR><BR>
Try This Search On:
<BR>
<A HREF="http://www.infoseek.com/Titles?qt=$term">Infoseek</A> |
<A HREF="http://www.altavista.digital.com/cgi-bin/query?q=$term">Altavista</A> |
<A HREF="http://search.yahoo.com/bin/search?p=$term">Yahoo</A> |
<A HREF="http://search.excite.com/search.gw?search=$term">Excite</A> |
<A HREF="http://www.hotbot.com/?MT=$term">Hotbot</A> |
<A
HREF="http://www.lycos.com/cgi-bin/pursuit?matchmode=and&cat=lycos&query=$term">Lycos</A>

Bob Wirth
Wirthit.com
Quote Reply
Re: Querying other Search engines with 2.0 In reply to
Links 2 has this feature already, and it works fine. No other MOD is needed.

------------------
Jian Liu
Indiana University Libraries
Quote Reply
Re: Querying other Search engines with 2.0 In reply to
 
Yes, I've seen that, but since, I've retained the old site_html.pl from (links 1.1), so I'd be glad if you could tell me what code to insert (and where) in site_html.pl, so that it can do queries on other search engines.

Appreciate your help. = Smile

Joe