You are here

function vote_up_down_comment in Vote Up/Down 5

Same name and namespace in other branches
  1. 6 vote_up_down.module \vote_up_down_comment()

Implementation of hook_comment().

File

./vote_up_down.module, line 236
vote_up_down is a module that adds a widget for +1/-1 votes on nodes. It depends upon Voting API. It's based upon "simplevote.module".

Code

function vote_up_down_comment(&$comment, $op) {
  switch ($op) {
    case 'view':
      if (variable_get('vote_up_down_widget_comment', 1)) {
        $style = variable_get('vote_up_down_widget_style_comment', 0) == 1 ? '_alt' : '';
        $comment->comment = theme("vote_up_down_widget{$style}", $comment->cid, 'comment') . $comment->comment;
      }
      break;
  }
}