Hi,
I found the following two globals from katabd, but the don't work with the links 3.2.0 search log.
Anyone who did this for 3.2.0?
Code:
Top search words: sub {
my ($output,$db,$sth);
my $db = $DB->table('SearchLog');
$db->select_options ('ORDER BY HitCount DESC', 'LIMIT 5');
$sth = $db->select;
while (my $row = $sth->fetchrow_hashref) {
$output .= qq~* <a href="$CFG->{db_cgi_url}/search.cgi?query=$row->{Term}">$row->{Term}</a><br>~;
}
return $output > -1 ? join('-', $output): 'No terms yet!';
}
Code:
Last searched words: sub {
my ($output,$db,$sth);
my $db = $DB->table('SearchLog');
$db->select_options ('ORDER BY TS DESC', 'LIMIT 5');
$sth = $db->select;
while (my $row = $sth->fetchrow_hashref) {
$output .= qq~* <a href="$CFG->{db_cgi_url}/search.cgi?query=$row->{Term}">$row->{Term}</a><br>~;
}
return $output > -1 ? join('-', $output): 'No terms yet!';
}
Matthias
gpaed.de