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

Re: [Matthias70] Plugin User_Clicks

Quote Reply
Re: [Matthias70] Plugin User_Clicks In reply to
Hi,

Glad that works for you :)

Quote:
What about this code. Is there something I could change to get the 'number of logins' output from community?

I don't see why not. It would just require you to add a function to the Auth_Community.pm file (in GLinks), something like:

Code:
sub get_users_login_count {

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');

my $num_logins = $db->select( { comm_username => $_[0] } )->fetchrow_hashref || die $GT::SQL::error;

return $num_logins;

}

..then call with:

<%Plugins::Auth_Community::get_users_login_count($Username)%>

This is *totally* untested, as I'm a bit busy at the moment, but hopefully it will work :)

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 Plugin User_Clicks Matthias70 6151 Aug 29, 2007, 8:20 AM
Thread Re: [Matthias70] Plugin User_Clicks
Andy 5990 Aug 29, 2007, 8:32 AM
Thread Re: [Andy] Plugin User_Clicks
Matthias70 6006 Aug 29, 2007, 10:16 AM
Thread Re: [Matthias70] Plugin User_Clicks
Andy 5973 Aug 30, 2007, 2:01 AM
Thread Re: [Andy] Plugin User_Clicks
Matthias70 5953 Aug 30, 2007, 7:25 AM
Thread Re: [Matthias70] Plugin User_Clicks
Andy 5985 Aug 30, 2007, 7:33 AM
Thread Re: [Andy] Plugin User_Clicks
Matthias70 5961 Aug 30, 2007, 10:37 AM
Thread Re: [Matthias70] Plugin User_Clicks
Andy 5953 Aug 31, 2007, 3:17 AM
Thread Re: [Andy] Plugin User_Clicks
Matthias70 5985 Aug 31, 2007, 3:28 AM
Thread Re: [Matthias70] Plugin User_Clicks
Andy 5973 Aug 31, 2007, 3:32 AM
Thread Re: [Andy] Plugin User_Clicks
Matthias70 5956 Aug 31, 2007, 3:45 AM
Thread Re: [Matthias70] Plugin User_Clicks
Andy 5980 Aug 31, 2007, 4:15 AM
Post Re: [Andy] Plugin User_Clicks
Matthias70 5933 Aug 31, 2007, 5:14 AM