Number of Stars
5 posts
• Page 1 of 1
Number of Stars
I just installed Extra Vote and I'm not sure what the different #s do at the end of the code. For example I have {extravote 6}. What is the difference if I have another number besides 6. Also, I'm getting 6 stars instead of 5 stars. How do I change that?
- wchild
- Fresh Boarder

- Posts: 2
- Joined: Sun Sep 07, 2008 4:47 pm
Re: Number of Stars
Hi,
It doesn't matter what number you type, as long as you don't repeat it in the same article. It is just an id to which assign the rating for a specific part of your content. It is also important not to change that number once the first vote has been stored.
I don't know why you are getting six stars instead of five... have you modified or replaced the stars images that came in the package?
It doesn't matter what number you type, as long as you don't repeat it in the same article. It is just an id to which assign the rating for a specific part of your content. It is also important not to change that number once the first vote has been stored.
I don't know why you are getting six stars instead of five... have you modified or replaced the stars images that came in the package?
-

chus - Administrator

- Posts: 450
- Joined: Thu Sep 13, 2007 2:21 am
- Location: Costa Rica
Re: Number of Stars
Thanks for the information about the numbers. Here is a link to a page where I have the Extra Vote showing.
http://www.professor-mario.com/medcente ... &Itemid=29
I haven't made any changes. I have kept everything as the default install.
http://www.professor-mario.com/medcente ... &Itemid=29
I haven't made any changes. I have kept everything as the default install.
- wchild
- Fresh Boarder

- Posts: 2
- Joined: Sun Sep 07, 2008 4:47 pm
Re: Number of Stars
Hi,
I love this plugin; it's so simple and works really well.
One person's 'bug' is another person's 'feature'; I need more than 5 stars so I can guarantee greater differentiation between results. I need to be able to have ratings out of 10 stars.
Is this possible? If so, how do I achieve it?
Thanks for your help!
Andrew
I love this plugin; it's so simple and works really well.
One person's 'bug' is another person's 'feature'; I need more than 5 stars so I can guarantee greater differentiation between results. I need to be able to have ratings out of 10 stars.
Is this possible? If so, how do I achieve it?
Thanks for your help!
Andrew
- butters
- Fresh Boarder

- Posts: 1
- Joined: Fri Apr 17, 2009 1:04 am
Re: Number of Stars
Butters,
I was in the same boat, here's what I did to enable 10 star voting:
I edited both of the extravote.php and backup.php files in the same manner, I'm pretty sure only $site_root/plugins/content/extravote.php needs to be edited though. The other two files are in $site_root/plugins/content/extravote/.
line 96 change:
to
and after line 116, add rating counts and associated CSS classes for ratings 6 - 10. My choices were pretty cheesy after 5, so you might to pick something else.
line 45 in ajax.php change:
to:
You'll need to extend the widths inside extravote.css to double their normal size and adjust width settings for ev-one through five to 10%. Here is the end result:
Not sure if you need to edit en-GB.plg_content_extravote.ini, but I put my vote text in there just in case.
Hope that helps.
-skint
butters wrote: I need more than 5 stars so I can guarantee greater differentiation between results. I need to be able to have ratings out of 10 stars.
Is this possible? If so, how do I achieve it?
Thanks for your help!![]()
Andrew
I was in the same boat, here's what I did to enable 10 star voting:
I edited both of the extravote.php and backup.php files in the same manner, I'm pretty sure only $site_root/plugins/content/extravote.php needs to be edited though. The other two files are in $site_root/plugins/content/extravote/.
line 96 change:
- Code: Select all
intval( $rating_count ))*20
to
- Code: Select all
intval( $rating_count ))*10
and after line 116, add rating counts and associated CSS classes for ratings 6 - 10. My choices were pretty cheesy after 5, so you might to pick something else.
- Code: Select all
<li><a href=\"javascript:void(null)\" onclick=\"javascript:JVXVote(".$id.",6,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JTEXT::_('Super Good')."\" class=\"ev-six-stars\">6</a></li>
118 <li><a href=\"javascript:void(null)\" onclick=\"javascript:JVXVote(".$id.",7,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JTEXT::_('Even Better')."\" class=\"ev-seven-stars\">7</a></li>
119 <li><a href=\"javascript:void(null)\" onclick=\"javascript:JVXVote(".$id.",8,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JTEXT::_('Still Better')."\" class=\"ev-eight-stars\">8</a></li>
120 <li><a href=\"javascript:void(null)\" onclick=\"javascript:JVXVote(".$id.",9,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JTEXT::_('Excellent')."\" class=\"ev-nine-stars\">9</a></li>
121 <li><a href=\"javascript:void(null)\" onclick=\"javascript:JVXVote(".$id.",10,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JTEXT::_('The Best')."\" class=\"ev-ten-stars\">10</a></li>
line 45 in ajax.php change:
- Code: Select all
if (($user_rating >= 1) and ($user_rating <= 5)) {
to:
- Code: Select all
if (($user_rating >= 1) and ($user_rating <= 10)) {
You'll need to extend the widths inside extravote.css to double their normal size and adjust width settings for ev-one through five to 10%. Here is the end result:
- Code: Select all
ul.extravote-stars{height:25px;width:250px;padding:0!important;margin:0!important;}
ul.extravote-stars-small{height:22px;width:220px;padding:0!important;margin:0!important;}
.
.
.
li a.ev-one-star{width:10%;padding:0;margin:0;z-index:11;}
li a.ev-two-stars{width:20%;padding:0;margin:0;z-index:10;}
li a.ev-three-stars{width:30%;padding:0;margin:0;z-index:9;}
li a.ev-four-stars{width:40%;padding:0;margin:0;z-index:8;}
li a.ev-five-stars{width:50%;padding:0;margin:0;z-index:7;}
li a.ev-six-stars{width:60%;padding:0;margin:0;z-index:6;}
li a.ev-seven-stars{width:70%;padding:0;margin:0;z-index:5;}
li a.ev-eight-stars{width:80%;padding:0;margin:0;z-index:4;}
li a.ev-nine-stars{width:90%;padding:0;margin:0;z-index:3;}
li a.ev-ten-stars{width:100%;padding:0;margin:0;z-index:2;}
Not sure if you need to edit en-GB.plg_content_extravote.ini, but I put my vote text in there just in case.
Hope that helps.
-skint
- skint
- Fresh Boarder

- Posts: 1
- Joined: Mon Jan 18, 2010 2:47 am
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests