Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
Products
:
Gossamer Forum
:
Development, Plugins and Globals
:
Number of messages
Previous Thread
Next Thread
Print Thread
View Flat
Apr 17, 2003, 1:51 PM
klauslovgreen
Enthusiast
(671 posts)
Apr 17, 2003, 1:51 PM
Post #1 of 5
Views: 3909
Shortcut
Number of messages
How can I get the number of new messages a user has (if any) into Community? (or a Links Installation)
ie.
Messages
1 NEW
Cheers
Klaus
http://www.ameinfo.com
Apr 18, 2003, 3:35 AM
klauslovgreen
Enthusiast
(671 posts)
Apr 18, 2003, 3:35 AM
Post #2 of 5
Views: 3796
Shortcut
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
Apr 29, 2003, 9:12 AM
pugdog
Veteran
(6956 posts)
Apr 29, 2003, 9:12 AM
Post #3 of 5
Views: 3742
Shortcut
Post deleted by pugdog
In reply to
Apr 29, 2003, 9:14 AM
pugdog
Veteran
(6956 posts)
Apr 29, 2003, 9:14 AM
Post #4 of 5
Views: 3748
Shortcut
Re: [klauslovgreen] Number of messages
In reply to
Wrong forum <G>
PUGDOG� Enterprises, Inc.
The best way to contact me is to
NOT
use Email.
Please leave a PM here.
Oct 29, 2003, 4:14 AM
Dinky
User
(354 posts)
Oct 29, 2003, 4:14 AM
Post #5 of 5
Views: 3580
Shortcut
Re: [pugdog] Number of messages
In reply to
Klauslovgreen,
I tried the above code, and I keep getting an error, where do you put the global at? the community, links, or the gforum???
Thanks,
</not a clue>
Previous Thread
Next Thread
Print Thread
View Flat