Hi,
This will work (just tested it). Make a new global called "check_bookmarked", with the following code:
Code:
sub {
my $count = $DB->table('Bookmark_Links')->count( { my_link_id_fk => $_[0], my_user_username_fk => $USER->{Username} } ) || 0;
$count ? return { isBookmarked => 1 } : return { isBookmarked => 0 }
}
The, in link.html add:
Code:
<%check_bookmarked($ID)%>
at the top of the template.
Then, you can use:
Code:
<%if isBookmarked%>alreadybookmarked<%else%>show bookmark link<%endif%>
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!