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

Re: [katakombe] SearchLogger, SearchFilter and globals

Quote Reply
Re: [katakombe] SearchLogger, SearchFilter and globals In reply to
Hi,

I just tried to do the SearchLogger thing for you, and sure enough - it doesn't work for me either. I had a quick look at the code, but couldn't see anything that would cause the problem. Maybe something GT will need to investigate, as it could be something deeper.

Obviously without this working - I can't do the tests for the Search keyword stuff, but these functions should work fine:


Last_Searched_Words

Code:
sub {

my $limit= $_[0] || 10;

my @output;
my $db = $DB->table('SearchLogger');
$db->select_options ('ORDER BY search_id DESC', "LIMIT $limit");

my $sth = $db->select( GT::SQL::Condition->new('slog_query','NOT LIKE','%http://%','slog_query','NOT LIKE','http://%') ) || die $GT::SQL::error;

while (my $row = $sth->fetchrow_hashref) {
push @output, $row;
}

return { search_logger_last_searched => \@output }

}

..then call with something like:

Code:
<%Last_Searched_Words(10)%>
<%if search_logger_last_searched.length%>
<ul>
<%loop search_logger_last_searched%>
<li><a href="gforum.cgi?do=search_results&search_forum=all&search_string=<%search_term%>&search_type=AND&search_fields=sb&sb=score&mh=25"><%search_term%></a></li>
<%endloop%>
</ul>
<%endif%>

The "top searches" is a bit harder- as I can't actually get their plugin working, so I don't really know what field relates to what.

Anyway, once the plugin is fixed up (hopefully by GT ;)), then I'll try and have a look at the other global too.

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!
Subject Author Views Date
Thread SearchLogger, SearchFilter and globals katakombe 6694 Oct 17, 2008, 11:02 PM
Thread Re: [katakombe] SearchLogger, SearchFilter and globals
Andy 6615 Oct 18, 2008, 12:32 AM
Thread Re: [Andy] SearchLogger, SearchFilter and globals
katakombe 6610 Oct 18, 2008, 12:36 AM
Thread Re: [katakombe] SearchLogger, SearchFilter and globals
Andy 6621 Oct 18, 2008, 12:38 AM
Post Re: [Andy] SearchLogger, SearchFilter and globals
katakombe 6592 Oct 18, 2008, 12:41 AM
Thread Re: [Andy] SearchLogger, SearchFilter and globals
katakombe 6614 Oct 26, 2008, 12:41 AM
Thread Re: [katakombe] SearchLogger, SearchFilter and globals
Andy 6568 Oct 27, 2008, 2:53 AM
Post Re: [Andy] SearchLogger, SearchFilter and globals
Andy 6588 Oct 27, 2008, 2:54 AM
Thread Re: [Andy] SearchLogger, SearchFilter and globals
katakombe 6580 Oct 27, 2008, 9:35 AM
Post Re: [katakombe] SearchLogger, SearchFilter and globals
Andy 6566 Oct 27, 2008, 9:46 AM