Best Reply
Overview
Best reply module allows node authors to mark a particular comment as the best reply. It aims to encourage quality comments and to give some recognition to people posting quality responses.
Links are provided to the author of the node or user with the correct privileges to mark a comment as the best reply, or clear the best reply. Only one comment can be marked as the best reply, so the author can change his or her mind and mark a different comment, which will overwrite or clear the old marked comment.
Once a comment has been marked as the best reply a view best reply link is provided in the links of the node to jump directly to the best reply.
Administrators have the ability to select node types and to restrict access via access control.
Installation
- Put the bestreply directory in your site modules directory.
See http://drupal.org/node/70151 for tips on where to install contributed modules. - Enable bestreply via admin/build/modules.
- Add some styles to your style.css to theme the best reply differently from other comments.
See Theming below.
Settings
admin/settings/bestreply
- Check the node types you want to be able to mark a comment as the best reply.
- View posts marked as best reply
Access Control
view bestreply: User can see link to view the best reply.
mark bestreply: User can mark best reply if they are the node author.
moderate bestreply: User can mark, change and clear best reply at any time.
administer bestreply: User can change settings.
clear bestreply: user can clear the best reply if they are the node author.
Theming
Modify your theme comment.tpl.php to the main div add:
<?php
if ($comment->bestreply) print 'id="bestreply"';
?>e.g.<div <?php if ($comment->bestreply) print 'id="bestreply"'; ?> class="comment<?php print ($comment->new) ? ' comment-new' : ''; print ($comment->status == COMMENT_NOT_PUBLISHED) ? ' comment-unpublished' : ''; print ' '. $zebra; ?>">
Now the best reply comment will be marked with an id of bestreply.
You can style that by adding to your style.css something along the lines of:
#bestreply { background:skyblue;}
or
#bestreply { background: url(medal.gif) top right no-repeat;}
