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

SearchLogger, SearchFilter and globals

Quote Reply
SearchLogger, SearchFilter and globals
Hi!

I have 3 questions/problems:

1.) SearchLogger don't work properly:

Before debugging:

Code:
A fatal error has occurred:
Can't call method "insert_id" on an undefined value at /home/katakomb/public_html/cgi-bin/forum/admin/Plugins/GForum/SearchLogger.pm line 46.
Please enable debugging in setup for more details.

After debugging:

Code:
A fatal error has occurred:
Can't call method "insert_id" on an undefined value at /home/katakomb/public_html/cgi-bin/forum/admin/Plugins/GForum/SearchLogger.pm line 46.
Please enable debugging in setup for more details.
Stack Trace
======================================
GForum (14000): Plugins::GForum::SearchLogger::prelog called at /home/katakomb/public_html/cgi-bin/forum/admin/GT/Plugins.pm line 121 with arguments
(search_results).
GForum (14000): GT::Plugins::dispatch called at /home/katakomb/public_html/cgi-bin/forum/admin/GForum.pm line 261 with arguments
(GT::Plugins, /home/katakomb/public_html/cgi-bin/forum/admin/Plugins/GForum, do_search_results, CODE(0xa7f370), search_results).
GForum (14000): GForum::_plg_do_func called at /home/katakomb/public_html/cgi-bin/forum/admin/GForum.pm line 252 with arguments
(search_results).
GForum (14000): GForum::__ANON__ called at /home/katakomb/public_html/cgi-bin/forum/admin/GT/Plugins.pm line 133 with arguments
(search_results).
GForum (14000): GT::Plugins::dispatch called at /home/katakomb/public_html/cgi-bin/forum/admin/GForum.pm line 252 with arguments
(GT::Plugins, /home/katakomb/public_html/cgi-bin/forum/admin/Plugins/GForum, do_func, CODE(0xa7f0e0), search_results).
GForum (14000): GForum::do_func called at gforum.cgi line 142 with arguments
(search_results).
GForum (14000): main::main called at /home/katakomb/public_html/cgi-bin/forum/admin/GT/Plugins.pm line 133 with no arguments.
GForum (14000): GT::Plugins::dispatch called at gforum.cgi line 22 with arguments
(GT::Plugins, /home/katakomb/public_html/cgi-bin/forum/admin/Plugins/GForum, main, CODE(0xb0a560)).

System Information
======================================
Perl Version: v5.8.8
Gossamer Forum Version: 1.2.4
GForum.pm version: 1.133
GT::SQL Version: 1.111
GT::Template Version: 2.163
DBI.pm Version: 1.607
Running under mod_perl: No
Running under SpeedyCGI: No
@INC =
/home/katakomb/public_html/cgi-bin/forum/admin
/usr/lib/perl5/5.8.8/x86_64-linux
/usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.3
/usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.
/home/katakomb/community/lib
GT::SQL::error = search_start cannot contain the value '1224307911.72726'
CGI INPUT
======================================
do => search_results
guest => 802947
search_forum => all
search_string => katakombe
search_type => AND
t => search_engine

CGI Cookies
======================================
__utma => 104774810.786136747.1224307004.1224307004.1224307004.1
__utmb => 104774810
__utmc => 104774810
__utmz=104774810.1224307004.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd => (none)

ENVIRONMENT
======================================
DOCUMENT_ROOT => /home/katakomb/public_html
GATEWAY_INTERFACE => CGI/1.1
GT_TMPDIR => /home/katakomb/public_html/cgi-bin/forum/admin/tmp
HTTP_ACCEPT => */*
HTTP_ACCEPT_LANGUAGE => sv
HTTP_CONNECTION => Keep-Alive
HTTP_COOKIE => __utma=104774810.786136747.1224307004.1224307004.1224307004.1; __utmb=104774810; __utmc=104774810; __utmz=104774810.1224307004.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
HTTP_HOST => www.katakombe.com
HTTP_UA_CPU => x86
HTTP_USER_AGENT => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GoogleT5; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
HTTP_XXXXXXX => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
HTTP_XXXXXXXXXXXXXXX => XXXXXXXXXXXXX
PATH => /usr/local/bin:/usr/bin:/bin
QUERY_STRING => guest=802947&t=search_engine&do=search_results&search_forum=all&search_type=AND&search_string=katakombe
REDIRECT_QUERY_STRING => guest=802947&t=search_engine&do=search_results&search_forum=all&search_type=AND&search_string=katakombe
REDIRECT_STATUS => 200
REDIRECT_URL => /forum/gforum.cgi
REMOTE_ADDR => 83.183.221.99
REMOTE_HOST => d83-183-221-99.cust.tele2.se
REMOTE_PORT => 62662
REQUEST_METHOD => GET
REQUEST_URI => /forum/gforum.cgi?guest=802947&t=search_engine&do=search_results&search_forum=all&search_type=AND&search_string=katakombe
SCRIPT_FILENAME => /home/katakomb/public_html/cgi-bin/forum/gforum.cgi
SCRIPT_NAME => /cgi-bin/forum/gforum.cgi
SERVER_ADDR => 74.220.215.244
SERVER_ADMIN => webmaster@katakombe.com
SERVER_NAME => www.katakombe.com
SERVER_PORT => 80
SERVER_PROTOCOL => HTTP/1.1
SERVER_SIGNATURE => Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.katakombe.com Port 80
SERVER_SOFTWARE => Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

2.) Is it possible to make SearchFilter plugin as for GLinks?

3.) Is it possible to have globals Last_Searched_Words and Top_Search_Words as for GLinks?

Thanks.

Last edited by:

katakombe: Oct 17, 2008, 11:03 PM
Quote Reply
Re: [katakombe] SearchLogger, SearchFilter and globals In reply to
Hi,

I wasn't even aware there was a SearchLogger for GForum?

Quote:
2.) Is it possible to make SearchFilter plugin as for GLinks?

3.) Is it possible to have globals Last_Searched_Words and Top_Search_Words as for GLinks?

Are you asking for those plugins to work with GForum?

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] SearchLogger, SearchFilter and globals In reply to
Hello Andy!

Quote:
I wasn't even aware there was a SearchLogger for GForum?

Yea, but in my case something is wrong Unsure

Quote:
Are you asking for those plugins to work with GForum?

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

Quote:
Yea, but in my case something is wrong Unsure

Mmm sorry, can't really help much without taking a proper look (I'm really bogged down today, gotta try and finish one project off, and get on with another one)

Regarding the other plugins, I'll see if I can put something together at some point. Reply to this post if I havn't done anything for 4-5 days, cos I've probably forgotten <G>

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] SearchLogger, SearchFilter and globals In reply to
That's very kind of you, thanks Andy Smile
Quote Reply
Re: [Andy] SearchLogger, SearchFilter and globals In reply to
Andy wrote:

Regarding the other plugins, I'll see if I can put something together at some point. Reply to this post if I havn't done anything for 4-5 days, cos I've probably forgotten <G>

As you've said .. Smile
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!
Quote Reply
Re: [Andy] SearchLogger, SearchFilter and globals In reply to
BTW, not really sure about the SearchFilter plugin - the GForum search system is quite a bit more complex in terms of the inner workings of it, so it would take a while to do some trial and error on a plugin for that (time I don't have I'm afraid, sorry)

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] SearchLogger, SearchFilter and globals In reply to
Hi Andy!

As always, you are very helpful, thanks Cool

Anyway, do you think that this error is maybe only on forums who are connected with GCommunity?

Once again, thank you Smile
Quote Reply
Re: [katakombe] SearchLogger, SearchFilter and globals In reply to
Hi,

No problem.

Regarding GComm and the SearchLogger errors - I'm not really sure. Could well be, but without testing it on a "fresh" install of GForum, its a little hard to know for sure.

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!