ohh
my mod searches the category and subs..
but if you want it to search category only..
youwould change the .... =~ /^$catsearch/
to
eq $catsearch
if you want it to do both..
the easiest way.. you change my mod to:
Code:
if ($in{'category'} && $in{'category'} ne "All") {
if ($in{'category'} =~ /+$/) {
($values[$db_category] =~ /^$in{'category'}/) or next LINE;
}
else {
($values[$db_category] eq $in{'category'}) or next LINE;
}
}
and the second part in category.html to:
Code:
<!-- Search Bar -->
<form action="<%db_cgi_url%>/search.cgi" method="GET">
<h2>Search</h2>
<div class="margin">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search">Looking for something in particular?</strong></td></tr>
<tr><td><input type="text" size=15 name="query"> <input type=submit value="Search!"></td></tr>
<tr><td><select name="category">
<option value="All" selected>in <%site_title%></option>
<option value="<%category_name_escaped%>" selected>in <%site_title%> only</option>
<option value="<%category_name_escaped%>+">in <%category_name_escaped%> and subcategories</option>
</select></td></tr>
<tr><td><small class="more"><a href="<%db_cgi_url%>/search.cgi">More search options</a></small></td></tr>
</table>
</div>
</form>
thanks!
jerry