Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: separated + and - votes
Pages: [1]   Go Down
  Print  
Author Topic: separated + and - votes  (Read 1237 times)
0 Members and 1 Guest are viewing this topic.
johan d
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« on: March 11, 2010, 13:01:30 »

Is it possible to display all the positive votes and all the negative votes separatly? Not a sum of both?
i know that for the 1st remark 6 people have voted against and 2 pro, but i cannot see that

http://onsgenoegen.be/index.php?option=com_content&view=article&id=151&Itemid=84
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #1 on: March 11, 2010, 14:50:57 »

Yes, you can make it so. You need just edit tpl_comment.php template file and change dispalying of votes. Replace:

Code: (php)
function getCommentVoteValue( &$comment )
{
$value = intval($comment->isgood - $comment->ispoor);

if ($value == 0 && $this->getVar('button-vote', 0) == 0 && $this->getVar('get_comment_vote', 0) == 0) {
// if current value is 0 and user has no rights to vote - hide 0
return;
}

if ($value < 0) {
$class = 'poor';
} else if ($value > 0) {
$class = 'good';
$value = '+' . $value;
} else {
$class = 'none';
}
?>
<span class="vote-<?php echo $class?>"><?php echo $value?></span>
<?php
}
with something like:


Code: (php)
function getCommentVoteValue( &$comment )
{
?>
<span class="vote-good"><?php echo $comment->isgood?></span> / <span class="vote-poor"><?php echo $comment->ispoor?></span>
<?php
}
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: separated + and - votes
 
Jump to: