Gossamer Forum
Quote Reply
search logger mod
I'm using GT's Lsql search logger plug-in and was wondering if there was a way that I can make that information available to the 'registered' end user - like just a list of the keywords.

thx.

Last edited by:

SSmeredith: Aug 26, 2003, 7:06 AM
Quote Reply
Re: [SSmeredith] search logger mod In reply to
Hi Merdith. If you send over over your LSQL admin panel, I'll have a go at writing a global for you. I'll make it public (here) when I have a working version :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] search logger mod In reply to
OK, sent

Smile
Quote Reply
Re: [SSmeredith] search logger mod In reply to
I was left with too much time to think ....

How about letting the user receive the list by email if requested. But then I could just set up a custom list and they could subscribe from there huh... how to automatically add the keywords to the list - and then run a cron weekly? Just some ideas...


oh, and a cron to clear out the terms on a weekly basis

Last edited by:

SSmeredith: Aug 26, 2003, 7:53 AM
Quote Reply
Re: [SSmeredith] search logger mod In reply to
Afraid I don't have time to do anything like that :(

For those who are interested, this is the global used;

show_search_stats =>

Code:
sub {

my $limit = shift;

my $table = $DB->table('SearchLog');
$table->select_options("ORDER BY HitCount", "LIMIT $limit");
my $sth = $table->select();
my $back;

if ($sth) {
while (my $hit = $sth->fetchrow_hashref) {
my $word = $hit->{Term};
my $hits = $hit->{HitCount};
my $results = $hit->{Results};
$back .= qq|Keyword: $word <BR>Hits: $hits <BR> Results: $results <BR><BR>|;
}
} else { return ''; }

return $back;

}

.. and call with something like;

Code:
<%if Username%><%show_search_stats('5')%><%endif%>


Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] search logger mod In reply to
Works great - thanks Andy! Wink