--- original/vote_up_down/vote_up_down.module 2007-12-12 11:35:32.000000000 -0800 +++ vote_up_down.module 2007-12-12 11:44:46.000000000 -0800 @@ -498,21 +498,31 @@ if (user_access('use up-down vote') && ($user->uid || variable_get('vote_up_down_anonymous_vote', 0))) { $user_vote = votingapi_get_user_votes($type, $cid, _vote_up_down_get_uid()); + if ($type == 'comment'){ + $vote_up = 'vote_up_comment_'; + $vote_down = 'vote_down_comment_'; + $comment = '-comment'; + } + else { + $vote_up = 'vote_up_'; + $vote_down = 'vote_down_'; + $comment = ''; + } if ($user_vote[0]->value > 0) { - $class = 'vote-up-act'; - $class2 = 'vote-down-inact'; + $class = 'vote-up-act'. $comment; + $class2 = 'vote-down-inact'. $comment; } else if ($user_vote[0]->value < 0) { - $class = 'vote-up-inact'; - $class2 = 'vote-down-act'; + $class = 'vote-up-inact'. $comment; + $class2 = 'vote-down-act'. $comment; } else { - $class = 'vote-up-inact'; - $class2 = 'vote-down-inact'; + $class = 'vote-up-inact'. $comment; + $class2 = 'vote-down-inact'. $comment; } - $output .= ''. l('', "vote_up_down/$type/$cid/1", array('class' => $class, 'title' => t('Vote up')), drupal_get_destination(), NULL, FALSE, TRUE) .''; - $output .= ''. l('', "vote_up_down/$type/$cid/-1", array('class' => $class2, 'title' => t('Vote down')), drupal_get_destination(), NULL, FALSE, TRUE) .''; + $output .= ''. l('', "vote_up_down/$type/$cid/1", array('class' => $class, 'title' => t('Vote up')), drupal_get_destination(), NULL, FALSE, TRUE) .''; + $output .= ''. l('', "vote_up_down/$type/$cid/-1", array('class' => $class2, 'title' => t('Vote down')), drupal_get_destination(), NULL, FALSE, TRUE) .''; } else { $output .= ''; @@ -558,16 +568,22 @@ function theme_vote_up_down_points($cid, $type, $nodelink = FALSE) { $vote_result = votingapi_get_voting_result($type, $cid, 'points', variable_get('vote_up_down_tag', 'vote'), 'sum'); + if ($type == 'comment'){ + $vote_points = 'vote_points_comment_'; + } + else { + $vote_points = 'vote_points_'; + } if ($nodelink) { if ($vote_result) { $output = array( - 'title' => ''. format_plural($vote_result->value, '1 point', '@count points') .'', + 'title' => ''. format_plural($vote_result->value, '1 point', '@count points') .'', 'html' => TRUE ); } else { $output = array( - 'title' => ''. t('0 points') .'', + 'title' => ''. t('0 points') .'', 'html' => TRUE ); }