Pugdog,
Just tried this with the numbered link mod and the result was that on every page the links were 1 to 10 and not 1 to 10, 11 to 20, 21 to 30 etc.
Here is the code I am using with both mods.
my $links_count=0;
# Build the list of link results.
if ($link_hits) {
my (%link_results, %displayed, $name);
foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$hit->{'links_count'} = ++$links_count;
$link_results .= &site_html_link ($hit, $dynamic);
}
# foreach my $hit (@$link_hits) {
# next if ($displayed{$hit->{CategoryID}}++);
# $name = &get_category_name ($hit->{CategoryID});
# $link_results .= "<p>" . &search_build_linked_title ($name) . "</p>";
# $link_results .= $link_results{$hit->{CategoryID}};
# }
}
What's going wrong? It worked fine before I removed the category names from appearing with the search results.
JeffB.
Just tried this with the numbered link mod and the result was that on every page the links were 1 to 10 and not 1 to 10, 11 to 20, 21 to 30 etc.
Here is the code I am using with both mods.
my $links_count=0;
# Build the list of link results.
if ($link_hits) {
my (%link_results, %displayed, $name);
foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$hit->{'links_count'} = ++$links_count;
$link_results .= &site_html_link ($hit, $dynamic);
}
# foreach my $hit (@$link_hits) {
# next if ($displayed{$hit->{CategoryID}}++);
# $name = &get_category_name ($hit->{CategoryID});
# $link_results .= "<p>" . &search_build_linked_title ($name) . "</p>";
# $link_results .= $link_results{$hit->{CategoryID}};
# }
}
What's going wrong? It worked fine before I removed the category names from appearing with the search results.
JeffB.