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

Re: [klauslovgreen] Number of messages

Quote Reply
Re: [klauslovgreen] Number of messages In reply to
Got it sorted - in case anyone is interested:

Global (new_messages):
Code:
sub {
my $user_id = shift;
lib->import('/path/to/gforum/admin');
require GT::SQL;
my $DB = GT::SQL->new('/path/to/gforum/admin/defs');
return $DB->table('Message')->count({ to_user_id_fk => $user_id, msg_status => 0 });
}

Call it from your template as:

<%new_messages($app_forum_user_id)%>

Cheers
Klaus

http://www.ameinfo.com
Subject Author Views Date
Thread Number of messages klauslovgreen 3171 Apr 17, 2003, 1:51 PM
Thread Re: [klauslovgreen] Number of messages
klauslovgreen 3074 Apr 18, 2003, 3:35 AM
Post Post deleted by pugdog
pugdog 3022 Apr 29, 2003, 9:12 AM
Thread Re: [klauslovgreen] Number of messages
pugdog 3023 Apr 29, 2003, 9:14 AM
Post Re: [pugdog] Number of messages
Dinky 2860 Oct 29, 2003, 4:14 AM