Index: vud_comment/vud_comment.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/vote_up_down/vud_comment/vud_comment.module,v retrieving revision 1.8 diff -u -p -r1.8 vud_comment.module --- vud_comment/vud_comment.module 2 Aug 2010 05:13:53 -0000 1.8 +++ vud_comment/vud_comment.module 23 Oct 2010 23:41:05 -0000 @@ -10,7 +10,7 @@ * Implementation of hook_perm(). */ function vud_comment_perm() { - return array('administer vote up/down on comments', 'use vote up/down on comments'); + return array('administer vote up/down on comments', 'use vote up/down on comments', 'view vote up/down count on comments'); } /** @@ -96,10 +96,11 @@ function vud_comment_comment(&$comment, case 'view': $type = _vud_comment_get_node_type($comment->nid); $comment_allow = in_array($type, variable_get('vud_comment_node_types', array()), TRUE); - if ($comment_allow && user_access('use vote up/down on comments')) { + $readonly = 0; + if ($comment_allow && user_access('use vote up/down on comments') || $readonly=user_access('view vote up/down count on comments')) { $tag = variable_get('vud_tag', 'vote'); $widget = variable_get('vud_comment_widget', 'plain'); - $comment->comment = theme('vud_widget', $comment->cid, 'comment', $tag, $widget) . $comment->comment; + $comment->comment = theme('vud_widget', $comment->cid, 'comment', $tag, $widget, $readonly) . $comment->comment; } break; }