Ok! DONE!!
It's REALLY easy.. Looks simpler than LLink's
anyways.. this will search in the category that it is stated in and UP (sub categories)..
here.. in search.cgi FIND:
Code:
my $nh = $in{'nh'} | | 1;
and add this, one line below:
Code:
my $catsearch = $in{'category'} if ($in{'category'});
my $catsearch = "All" if (!$in{'category'});
then find this:
Code:
$link_output{$setoflinks} .= &site_html_link (%tmp) . "\n";
and replace it with:
Code:
$link_output{$setoflinks} .= &site_html_link (%tmp) . "\n" if ($catsearch eq "All");
$link_output{$setoflinks} .= &site_html_link (%tmp) . "\n" if ($tmp{'Category'} =~ /^$catsearch/);
$link_hits-- if ($tmp{'Category'} =~ /^$catsearch/);
now on your category pages.. you will have to make a search form seperate than the one on the main page and all others.. and add this inside the form..
Code:
<select name="category">
<option value="All" selected>in $site_title</option>
<option value="$category_name_escaped">in $category_name_escaped</option>
</select>
you can also add it on advanced options.. with a list of all the categories.. (will make when I release the instructions on my page.. [few days])
hope you understand..
jerry
[This message has been edited by widgetz (edited July 12, 1999).]
[This message has been edited by widgetz (edited July 13, 1999).]