Gossamer Forum
Home : Products : Gossamer Links : Discussions :

elseif in glinks combined with gcommunity?

Quote Reply
elseif in glinks combined with gcommunity?
Hi Andy,
I want to include a profile field of my gcommunity into a elseif code in glinks!
Can you tell me how to do this?

<%elsif user_links_anzahl > 1%>
<%get_last_additions_for_user($user.Username)%>
<%if days_since_last_link > 365 and prof_company eq BlaBla%>

The red part is a profile field in gcommunity.
Thanks

Matthias
gpaed.de

Last edited by:

Matthias70: Nov 17, 2010, 12:47 PM
Quote Reply
Re: [Matthias70] elseif in glinks combined with gcommunity? In reply to
MMm... not sure. I guess you would have to load their GComm profile as well.

Maybe something like:

load_comm_profile
Code:
sub {

my $username = $_[0];

my $NEWDB = new GT::SQL ( def_path => "/path/to/gcomm_private/def", cache => 0, debug => 0, subclass => 1 );

my $comm_user = $DB->table('comm_users')->select( { comm_username => $username } )->fetchrow_hashref;

return { 'comm_profile' => $comm_user }

}

<%load_comm_profile($Username)%>

..then you should have access to it via <%comm_profile.prof_company%>

Untested, but should work Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] elseif in glinks combined with gcommunity? In reply to
Hi Andy,
thanks I will test this.

What do you think? Will loading GComm profile into glinks slow down my site?

Thanks

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] elseif in glinks combined with gcommunity? In reply to
NP

Re slowing it down - it will a little, as its obivously gotta grab the record from the comm_users table, but I shouldn't think it would slow it down too much

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] elseif in glinks combined with gcommunity? In reply to
Thanks for the fast answer. I wrote a question about line breaks in the gcommunity forum. Do you have an answer Blush

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] elseif in glinks combined with gcommunity? In reply to
Will try and have a look at that later - little busy atm =)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] elseif in glinks combined with gcommunity? In reply to
Hi Andy,
I have this error with the global above!
Code:
GT::SQL (29290): File 'pathto/defs/glinks_comm_users.def' does not exist or the permissions are set incorrectly at (eval 27) line 7.


Thanks

Matthias
gpaed.de

Last edited by:

Matthias70: Nov 20, 2010, 10:48 AM
Quote Reply
Re: [Matthias70] elseif in glinks combined with gcommunity? In reply to
Sorry, this line:

Code:
my $comm_user = $DB->table('comm_users')->select( { comm_username => $username } )->fetchrow_hashref;

should be:

Code:
my $comm_user = $NEWDB->table('comm_users')->select( { comm_username => $username } )->fetchrow_hashref;

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] elseif in glinks combined with gcommunity? In reply to
Cool, now it's working
Thanks

Matthias
gpaed.de