I have been able to set up a flag with Advanced forum to allow users to mark comment in a thread they started as an accepted answer. It was simple to set up and works well.

However, it seems Flag only alters a comment if the user has permissions to set/unset the flag. I want a tick to appear on a comment which has been flagged which any (even anonymous) users should be able to see. How do I go about doing that?

1 Answer 1


You could add a new boolean field Answer to comments which has a default value of 0. Next, create a Rule that changes the boolean value of a flagged comment to 1. The rest is theming; use the following code in your comment.tpl.php file:

<?php if ($comment->field_answer['und'][0]['value']): ?>
  <mark>This is the answer</mark>
<?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.