Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: From x to x displayed

Quote Reply
Re: From x to x displayed In reply to
Ok, I figured it out!!
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!!
Subject Author Views Date
Thread From x to x displayed tmoretti 3566 Dec 15, 1999, 6:56 AM
Post Re: From x to x displayed
Alex 3456 Dec 15, 1999, 8:33 AM
Post Re: From x to x displayed
tmoretti 3450 Dec 15, 1999, 12:47 PM
Post Re: From x to x displayed
Alex 3462 Dec 15, 1999, 1:44 PM
Post Re: From x to x displayed
tmoretti 3464 Dec 17, 1999, 4:27 PM
Post Re: From x to x displayed
tmoretti 3453 Dec 18, 1999, 7:08 AM
Post Re: From x to x displayed
widgetz 3456 Dec 18, 1999, 9:13 AM
Post Re: From x to x displayed
tmoretti 3454 Dec 22, 1999, 10:47 AM