Hi,
I want one flag to disappear if the same node is flagged with another flag. Means: I have flag A and flag B for the same content type and want Flag A to disappear if the node is already flagged with flag B and the other way around - flab B should disappear if it is flagged with flag A. IMPORTANT: I placed the links to the flags in the way like it is mentioned here http://drupal.org/node/295383 so I just need a PHP snippet to check if a node is flagged.
How would be the PHP code to check this in a node-contenttype.tpl.php file??? I need something like
<?php
global $user;
if(
$user->uid == $node->uid)
print flag_create_link('flag_name', $node->nid);
?>where I check if a user wrote this node as I want this flagging just be possible for users who wrote the node. I am not that fit with PHP and would be very grateful if someone could help me...
Greez,
Tobias
Comments
Comment #1
quicksketchSee #474410: Display image on node teaser/body if certain flag is checked, which is basically the same request and includes some sample code that does what you're wanting.
Comment #2
tobiberlinThank you very much, that helped me... I used a if-else:
Now the link for flag B just appears if flag A is unflagged
Comment #3
quicksketchGreat, that's the intended behavior right? If so, then this issue is fixed.