Closed (duplicate)
Project:
Flag
Version:
6.x-1.2
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2008 at 19:21 UTC
Updated:
6 May 2010 at 06:40 UTC
Hello
I'm hoping that this is possible.
I will need a global flag set up so that once the flag is triggered, it is updated site wide, for everyone visiting the node. But here's the catch: I only want the node author to be able to trigger the flag. I understand that this may be possible by using Contemplate, and putting an if block around it, but I would really like to keep the flag link inside of Drupals $links variable if I can.
Any ideas?
Thanks
Comments
Comment #1
XBleed commentedI ended up removing the flags from the node view, and manually adding them in the node.tpl.php file with flag_create_link(), I found #304799 and used it for reference.
For anyone interested, here is the code I used:
Comment #2
minus commented#drupal 6
I'd really like to thank Keyz_ at irc #drupal-support for this!
Comment #3
mooffie commented(This is a duplicate of #285237: Ability to disallow a flag/unflag operation.)
Comment #4
kpv commentedAnother variant
add
case 'view':toflag_nodeapi(flag.module)then change flag.tpl.php:
Comment #5
kpv commentedAnother solution:
Make a module (here
hide_flag_favorite.module) and use hook_link_alter