Hi,
Those aren't valid routines =)
Try adding this to Auth_Community.pm (should work fine in GLinks and GForum);
Code:
sub get_users_online {
my $min = $IN->param('min') || 60;
my $cfg = Links::Plugins->get_plugin_user_cfg('Auth_Community');
my $NEWDB = new GT::SQL (
def_path => "$cfg->{community_private}/defs",
cache => 0,
debug => 0,
subclass => 1
);
require GT::SQL::Condition;
my $db = $NEWDB->table('comm_users', 'comm_sessions');
my $cd = GT::SQL::Condition->new(
'sess_expire', '>=', time,
'sess_accessed', '>=', time - ($min * 60)
);
my $count = $db->count($cd) || die $GT::SQL::error;
return $count;
}
Then, call with:
Code:
<%Plugins::Auth_Community::get_users_online%>
Hope that helps.
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!