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

MyLinks Global question....

Quote Reply
MyLinks Global question....
Hi

I am trying to come up with a global to identify the users with Mylinks saved on file so I can present them with a special notes and menu tage..

I have created a global called: if_user_mylinks

sub {

my $tags = shift;

my $db = $DB->table ('MyLinks','Users');

my $mylinks = $db->select ({UserID=>$tags->{UserID}},['Username'])->fetchrow_array;

if ($mylinks) {return $mylinks;}

else {return;}

}

Then in include_menu.html i used

<%if if_user_mylinks%>

MyLinks Home

<%endif%>

but that is not working?

Any suggestions..?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Global question.... In reply to
Any input here?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Global question.... In reply to
Hi,

I'm sure you've probably figured this out by now, but if not, this should work:

sub {

my $tags = shift;

my $db = $DB->table ('MyLinks');

my $mylinks = $db->select ({UserID=>$tags->{Username}},['UserID'])->fetchrow_array;

if ($mylinks) {return $mylinks;}

else {return;}

}
The UK High Street
Quote Reply
Re: [afinlr] MyLinks Global question.... In reply to
Thanks Laura

I actually dropped the method and was using another way.

But now i will give the new global a try..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory