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

Modifying Search Log Global

Quote Reply
Modifying Search Log Global
This global gives search terms.

Code:
sub {
# return search table data
my (@links,$sth,$link);
my $search_db = $DB->table('SearchLogs');
$search_db->select_options ("ORDER BY slog_count DESC","LIMIT $_[0]");
$sth = $search_db->select ({});
while (my $link = $sth->fetchrow_hashref) {
$link = Links::SiteHTML::tags('link', $link);
$link->{slog_query} =~ s/ /+/g;
push@links, $link;
}
return {srchdata=>\@links};
}

Problem --

I'm using the slog_query in the URL and for title. The url is fine with car+mats BUT needing to use slog_query for title WITHOUT the plus, i.e car mats.

How can this be done??

~ ERASER


Free JavaScripts @ Insight Eye
Subject Author Views Date
Thread Modifying Search Log Global Eraser 3358 Jan 4, 2008, 3:05 PM
Thread Re: [Eraser] Modifying Search Log Global
Wychwood 3269 Jan 4, 2008, 3:51 PM
Post Re: [Wychwood] Modifying Search Log Global
Eraser 3267 Jan 4, 2008, 3:59 PM