Gossamer Forum
Home : Products : Links 2.0 : Customization :

Automate AltaVista Mod

Quote Reply
Automate AltaVista Mod
Anybody knows how to have Links search the AltaVista mod if there is nothing found in the Links' database?

Here is an example (just like in Yahoo!):

When you do a search from Links, if there is nothing found in Links' database, Links would normally shoot out the 'Search Failed' page in the site_html.pl file under sub site_html_search_failure { routine. Is there a mod that we can use to have Links automatically invoke the AltaVista mod search? That way at least we have something to show to our users instead of a NOTHING found page.

Any ideas on how to automate the AltaVista mod with Links?

Thanks!

John
Quote Reply
Re: Automate AltaVista Mod In reply to
Are you looking for additional information other than what is in the 50+ responses in the other thread regarding Alta Vista?

Smile

--Mark

------------------
You can reach me by ICQ at UIN #8602162


Quote Reply
Re: Automate AltaVista Mod In reply to
Yes Mark.

Nowhere in that thread had anybody mentioned anything about automating the AltaVista mod. So I thought it would be appropriate to start a new discussion about HOW TO AUTOMATE or INCORPORATE the script to work in conjunction with Links -- now that we have it.

There is a way of getting the meta script to work, however it's not automatic. The user/searcher must click on a hyperlink to query the AltaVista mod when a search fails. Here is what I have done on my site_html.pl file in the 'Search Failed' page:

This is the actual html code I use:

<A HREF="http://www.mylinks.com/cgi-bin/meta.perl?query=$term">Search Again using our MetaSearch feature - <em>click here</em></a>

And this is what the user will see:

Error: no matching records
Search Again using our MetaSearch feature - click here

So yes, it does work but it's a TWO-STEP process and does not look too professional if you want to impress your users.

John

[This message has been edited by jmurphy (edited December 20, 1998).]
Quote Reply
Re: Automate AltaVista Mod In reply to
Easiest is just replace &site_html_view_error with:

print "Location: http://www.mylinks.com/cgi-bin/meta.perl?query=$term\n\n";

So that if the search fails, the user will automatically get redirected to the metasearch script.

Be sure to remove the &html_print_headers call..

Cheers,

Alex
Quote Reply
Re: Automate AltaVista Mod In reply to
Hi BevG,
Alex didnt tell you to insert the code:
print "Location:http://www.mylinks.com/cgi-bin/altavista.cgi?query=$term\n\n";
into
&site_html_search_failure routine
but to replace &site_html_search_failure routine with the code.
So the server will directly take you to altavista.cgi without taking you to the search failure page.
Quote Reply
Re: Automate AltaVista Mod In reply to
Hi BevG, Its me again.
I have just done a sample in my site
poyin.com/resource (still under construction)

You can try a search for the word "mp4" to see if that's what you want.



[This message has been edited by Rock (edited February 09, 1999).]
Quote Reply
Re: Automate AltaVista Mod In reply to
Mine works flawlessly.

If there is nothing found in Links' database, the meta search will take over and do a search on AltaVista transparently.

Go see for yourself.

John


------------------
www.yahoosuck.com - it really does!
jmurphy@yahoosuck.com
Quote Reply
Re: Automate AltaVista Mod In reply to
Rock,

Could you please explane to me how you did this ?

------------------
Quote Reply
Re: Automate AltaVista Mod In reply to
This is how mine looks. Works like a charm!

sub site_html_search_failure {
# ---------------------------------------------
# This routine displays a failed search page with error in $error.
#
my ($error) = $_[0];
print "Location: http://www.my-domain.com/cgi-bin/altavista.cgi?query=$term\n\n";
}


... Whew... After reviewing my keyword log for the past 2 days I had noticed that many people where rephrasing their search queries and then giving up when there were not any entries with mutliple words in them, even after using the extra +/- AND commands. Even though I have posted the link to the meta search using the form field, they did not seem to understand what it meant. All they really noticed was the 'ERROR: NO MATCHING LINKS'. So, this will help out a bunch! Thanks Alex! You Rock! Wink
Quote Reply
Re: Automate AltaVista Mod In reply to
Alex when I insert your code
print "Location:
http://www.mylinks.com/cgi-bin/altavista.cgi?query=$term\n\n";

into the &site_html_search_failure routine, my search gets directed to a default tempory page by the server.The URL address to altavista.cgi is correct. It works if I call altavista.cgi up via browser.

The code by jmurphy in this post also works, I just can't seem to automate it!

any ideas?

Quote Reply
Re: Automate AltaVista Mod In reply to
Does anybody know where can I find the altavista.cgi that you says a lot in the forum?
I searched for it and dindnīt find it.
Quote Reply
Re: Automate AltaVista Mod In reply to
Hello !

I would also be interested to find out. Pl. let me know if possible. Thanks

------------------
deepy rajani
Quote Reply
Re: Automate AltaVista Mod In reply to
Hello !

I would also be interested to find out. Pl. let me know if possible. Thanks

------------------
deepy rajani