Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Search Logger Plugin - Span Pages No Longer Works

Quote Reply
Search Logger Plugin - Span Pages No Longer Works
The method it uses for the toolbar

my $tb = $DB->html($db,$IN)->toolbar ($nh, $mh, $hits, $IN->url);

no longer works
Quote Reply
Re: [giovanni] Search Logger Plugin - Span Pages No Longer Works In reply to
so you have to replace it with
Code:


this



sub build_search_toolbar {
# --------------------------------------------------------
# Create an Altavista style toolbar for the next and previous pages.
#
my $opts = shift;

my $root_url = $opts->{url};
my $numhits = $opts->{numlinks};
my $nh = $opts->{nh};
my $mh = $opts->{mh};

my ($next_hit, $prev_hit, $maxhits, $left, $right, $upper, $lower, $url, $i);

$maxhits = $mh || $CFG->{build_links_per_page};
$next_hit = $nh + 1;
$prev_hit = $nh - 1;

# First, set how many pages we have on the left and the right.
$left = $nh; $right = int($numhits/$maxhits) - $nh;
# Then work out what page number we can go above and below.
($left > 7) ? ($lower = $left - 7) : ($lower = 1);
($right > 7) ? ($upper = $nh + 7) : ($upper = int($numhits/$maxhits) + 1);
# Finally, adjust those page numbers if we are near an endpoint.
(7 - $nh >= 0) and ($upper = $upper + (8 - $nh));
($nh > ($numhits/$maxhits - 7)) and ($lower = $lower - ($nh - int($numhits/$maxhits - 7) - 1));
$url = "";
# Then let's go through the pages and build the HTML.
($nh > 1) and ($url .= qq~<a href="
$root_url&nh=$prev_hit">[<<]</a> ~);
for ($i = 1; $i <= int($numhits/$maxhits) + ( $numhits % $maxhits ? 1 : 0 ); $i++) {
if ($i < $lower) { $url .= " ... "; $i = ($lower-1); next; }
if ($i > $upper) { $url .= " ... "; last; }
($i == $nh) ? ($url .= qq~$i ~) : ($url .= qq~<a href="$root_url&nh=$i">$i</a> ~);
if ($i * $maxhits == $numhits) { $nh == $i and $next_hit = $i; last; }
}
$url .= qq~<a href="$root_url&nh=$next_hit">[>>]</a> ~ unless ($next_hit == $nh or ($nh * $maxhits > $numhits));
return $url;
}
Quote Reply
Re: [giovanni] Search Logger Plugin - Span Pages No Longer Works In reply to
If anyone cares I have fixed the search logger and integrated it with the search cache.
Quote Reply
Re: [giovanni] Search Logger Plugin - Span Pages No Longer Works In reply to
why does it no longer work?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Search Logger Plugin - Span Pages No Longer Works In reply to
The way that it builds the span pages toolbar is no longer supported I think. Apart from that it's fine.

Last edited by:

giovanni: Aug 18, 2002, 12:06 PM
Quote Reply
Re: [giovanni] Search Logger Plugin - Span Pages No Longer Works In reply to
It's stille there:

GT::SQL::Display::HTML->toolbar

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Search Logger Plugin - Span Pages No Longer Works In reply to
Guess so. It needs updating in the plugin tho'.
Quote Reply
Re: [giovanni] Search Logger Plugin - Span Pages No Longer Works In reply to
So what do I need to do to be able to see more than the first page of the logged searches?

I just installed the script and can only those 25 or 30 searches.

Thanks :)
Quote Reply
Re: [CyberLuke] Search Logger Plugin - Span Pages No Longer Works In reply to
Can somebody please tell me how I can get more than the first page of the search log in the report?

Thanks.
Quote Reply
Re: [CyberLuke] Search Logger Plugin - Span Pages No Longer Works In reply to
Hi,

I just found the answer to this here:

http://www.gossamer-threads.com/...i?post=143813#143813

Note that one of the $db variables is $db_daily.

Laura.
The UK High Street