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

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: New Voting System
Pages: [1]   Go Down
  Print  
Author Topic: New Voting System  (Read 4384 times)
0 Members and 1 Guest are viewing this topic.
sancho
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« on: October 29, 2011, 20:41:45 »

Hi,

I love JComment but I don't like the current voting system. I was wondering if a feature can be added to make the voting system much like Youtube one, where a 'like' and 'dislike' totals are visible all the time. This way you can tell how many liked and disliked the comments.

The current system doesn't really show how many people liked and disliked the comment. Thanks.


Sancho
Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #1 on: October 31, 2011, 13:51:13 »

You could change this in JComments template:

1. Open file /components/com_jcomments/tpl/default/tpl_comment.php
2. Find code:
Code: (php)
<span class="vote-<?php echo $class?>"><?php echo $value?></span>
and replace with:
Code: (php)
<span class="vote-good"><?php echo $comment->isgood != '+' $comment->isgood ''?></span>/<span class="vote-poor"><?php echo $comment->ispoor != '-' $comment->ispoor ''?></span>
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
imwarrior
Jr. Member
**

Karma: -3
Offline Offline

Posts: 21


Email
« Reply #2 on: November 01, 2011, 01:32:05 »

hi smart...i would like to vote for a rating sytem like this see image
its almost similar to what we have in jcomment with an extra recommended option plus sorting of comment


* Untitled.png (40 KB, 684x432 - viewed 446 times.)
« Last Edit: November 01, 2011, 01:33:39 by imwarrior » Logged

Support the Development of Jcomment Project , See How can you help and contribute to the Development of this wonderful extension
http://www.joomlatune.com/forum/index.php/topic,2542.0.html
sancho
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #3 on: July 24, 2012, 07:46:24 »

Hi Smart,

I finally got through in implementing the code you gave. Thanks for that. However, I have one more request. Is it possible to remove the positive sign "+" and the negative sign "-" in the numbers and display it in one line as opposed to two lines that it is displaying now.

Also, when voting, I would like the thumbs up/down to be replaced with 'Like' and 'Dislike', can you tell me which file to modify to achieve this? 

Thanks for your help again.


Regards,


sancho


You could change this in JComments template:

1. Open file /components/com_jcomments/tpl/default/tpl_comment.php
2. Find code:
Code: (php)
<span class="vote-<?php echo $class?>"><?php echo $value?></span>
and replace with:
Code: (php)
<span class="vote-good"><?php echo $comment->isgood != '+' $comment->isgood ''?></span>/<span class="vote-poor"><?php echo $comment->ispoor != '-' $comment->ispoor ''?></span>
Logged
sancho
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #4 on: July 24, 2012, 07:49:47 »

I forgot one more thing smart. I want '0' (zero) to be displayed instead of blank when there aren't any likes or dislikes. How can I achieve this? Thanks.


sancho
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: New Voting System
 
Jump to: