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
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