When people "search" for something, they want to find all the links to DIFFERENT sites, not the same link in 20 different categories.... If they "browsed" by category, the link would show up in each category.
You might be able to work a global, if you wanted, that would list the other categories a link was found in.
Depending on how Alex coded the search, you might be able to alter it to show all the hits. It's obviously not as easy as simply removing a "distinct" keyword <G>
Alex would have to comment for sure, but this piece of code from Search.pm seems to take the "hits" and attach the category to them:
Code:
# And format the link results.
my ($link_results, %link_output);
if ($link_count) {
my $results = $link_sth->fetchall_hashref;
$links->add_reviews ($results);
if ($CFG->{build_search_gb}) {
my @ids = map { $_->{ID} } @$results;
my $catlink = $DB->table('CatLinks','Category');
my %names = $catlink->select ('LinkID', 'Full_Name', { LinkID => \@ids })->fetchall_list;
foreach my $link (@$results) {
push @{$link_output{$names{$link->{ID}}}}, $link;
}
}
else {
push @{$link_output{none}}, @$results;
}
}
You'd need to alter it to do a select on the CatLinks TABLE, and if Hits > 1, then you'd need to enter a loop and process each entry. It looks like the key here is LinkID, which means you'd have a problem with multiple entries.
Since you are grouping by category, obviously, you might combine this and the following block of code, grouping the links by category, which should over come the LinkID as key field problem.
But... I'm not sure how this would affect large searches (returning huge amounts of "hits") and span pages.
Search is still pretty much a "black box" to me in Links :)
PUGDOG� Enterprises, Inc. The best way to contact me is to
NOT use Email.
Please leave a PM here.