Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: Non-English Mod for search.cgi

Quote Reply
Re: Non-English Mod for search.cgi In reply to
I am not sure if this will work, but in sub main of search.cgi, change this code:

Code:
# Set search type -- either phrase or keyword. Also build keyword list to search on.
my @search_terms = ();
($in{'type'} eq 'phrase') ?
(@search_terms = ($in{'query'})) :
(@search_terms = split (/\s/, $in{'query'}));

to read:

Code:
# Set search type -- either phrase or keyword. Also build keyword list to search on.
my @search_terms = ();
$in{'query'} = (s/\/a/g, $in{'query'});
$in{'query'} = (s/\/e/g, $in{'query'});
$in{'query'} = (s/\/i/g, $in{'query'});
$in{'query'} = (s/\/o/g, $in{'query'});
$in{'query'} = (s/\/u/g, $in{'query'});
($in{'type'} eq 'phrase') ?
(@search_terms = ($in{'query'})) :
(@search_terms = split (/\s/, $in{'query'}));

You may not need the "\" before each one and there may be a way to combine those into one regexp. I just am not up on regexp's as well as I should be.

I hope this helps.

[This message has been edited by Bobsie (edited August 30, 1999).]
Subject Author Views Date
Thread Non-English Mod for search.cgi Diego 3856 Aug 29, 1999, 2:48 PM
Post Re: Non-English Mod for search.cgi
Diego 3829 Aug 29, 1999, 9:43 PM
Post Re: Non-English Mod for search.cgi
Diego 3827 Aug 30, 1999, 6:10 AM
Post Re: Non-English Mod for search.cgi
Bobsie 3835 Aug 30, 1999, 8:34 AM
Post Re: Non-English Mod for search.cgi
Bobsie 3828 Aug 30, 1999, 6:27 PM
Post Re: Non-English Mod for search.cgi
Diego 3860 Aug 30, 1999, 6:45 PM
Post Re: Non-English Mod for search.cgi
Bobsie 3846 Aug 30, 1999, 7:32 PM
Post Re: Non-English Mod for search.cgi
Diego 3828 Aug 31, 1999, 1:55 AM
Post Re: Non-English Mod for search.cgi
Diego 3834 Aug 31, 1999, 2:18 AM
Post Re: Non-English Mod for search.cgi
Diego 3829 Aug 31, 1999, 9:24 PM
Post Re: Non-English Mod for search.cgi
Diego 3830 Sep 1, 1999, 1:41 AM
Post Re: Non-English Mod for search.cgi
Jesus 3868 Sep 1, 1999, 8:34 AM
Post Re: Non-English Mod for search.cgi
Jesus 3832 Sep 1, 1999, 12:35 PM
Post Re: Non-English Mod for search.cgi
Diego 3832 Sep 1, 1999, 5:08 PM
Post Re: Non-English Mod for search.cgi
Diego 3831 Sep 3, 1999, 8:16 AM
Post Re: Non-English Mod for search.cgi
Diego 3843 Sep 4, 1999, 7:23 AM
Post Re: Non-English Mod for search.cgi
miguel 3839 Oct 17, 1999, 7:12 PM
Post Re: Non-English Mod for search.cgi
Diego 3849 Oct 18, 1999, 1:34 PM
Post Re: Non-English Mod for search.cgi
marcoBR 3832 Mar 25, 2000, 7:38 PM
Post Re: Non-English Mod for search.cgi
JAC 3830 Apr 29, 2000, 3:17 AM
Post Re: Non-English Mod for search.cgi
Stealth 3857 Apr 29, 2000, 8:16 AM