Ok, I figured it out!!
Here is what you have to do!
Where you have:
foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$link_results{$hit->{CategoryID}} .= &site_html_link ($hit, $dynamic);
}
Change for this:
foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$link_results{$hit->{CategoryID}} .= &site_html_link ($hit, $dynamic);
$showing++;
}
Then, before the call to the search results routine (&site_html_search_results) put this:
my $to = $from + $showing -1;
my $show = "From $from to $to links being displayed!";
Then then add show => $show to the search results call and you can use <%show%> to diplay this in search results.
That's all!!
Here is what you have to do!
Where you have:
Code:
my (%link_results, %displayed, $name); foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$link_results{$hit->{CategoryID}} .= &site_html_link ($hit, $dynamic);
}
Change for this:
Code:
my (%link_results, %displayed, $name, $showing); foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$link_results{$hit->{CategoryID}} .= &site_html_link ($hit, $dynamic);
$showing++;
}
Then, before the call to the search results routine (&site_html_search_results) put this:
Code:
my $from = ($nh > 1) ? (($nh-1) * $mh+1) : 1; my $to = $from + $showing -1;
my $show = "From $from to $to links being displayed!";
Then then add show => $show to the search results call and you can use <%show%> to diplay this in search results.
That's all!!