Ok... i'll be putting this up in the mods section shortly, if there's enough demand for it (doubt it).
#i promise to put this into a list when i have the time
before sub main, put this:
$search_all_types=0;$i=0;$j=0;
and then, for every 'type' you have, put these 2 lines in for it:
$i++;$j++;
if ($in{'XXXXXX'}) $j--;
at the end of that, put this:
if ($j<$i) $search_all_types=1;
then, in sub search, where you see:
# Check to see if the link matches.
paste this code block over the one that's there:
Code:
$match = 0; $andmatch = 1;
if ($in{"$values[$db_type]"} | | $search_all_types) {
if ($regexp) {
FIELD: foreach $field (@search_fields) {
$_ = $values[$field];
$or_match ?
($match = $match | | &{$regexp}) :
($match = &{$regexp});
last FIELD if ($match);
}
}
}
now, all you need to do is add a field to your links.def, and link it as $db_type= 14 (or whatever the number you added it as is.), and put checkboxes in your html with names equal to the types...
i realize this is probably one of the user-unfriendliest mods u've seen... it'll get better after i've actually gotten the chance to put it to the test, and have time to type it up better.
--Tom (not responsible if you accedentally put this in wrong and you create a virulent perl script)
[This message has been edited by garadon (edited September 30, 1999).]