how to make max stars 10 rather than 5 on rating

More
15 years 4 months ago #10347 by F0l2saken
I've tried to figure this out for a while and can't figure it out. I want to make the max rating on an article 10 stars rather than 5 stars as I'm going to use flexcontent to write reviews, does anyone know how to do this? 5 Stars just won't work for my application. I've tried looking through some files but can't figure out where to start. I don't need multiple votes as I've read in other posts, just a max vote of 10 rather than 5.

Please Log in or Create an account to join the conversation.

More
15 years 4 months ago - 15 years 4 months ago #10353 by effrit
ok.
i share this topsecret to everyone :)

so, list of files you must change:

1) components\com_flexicontent\controller.php
just replace in 431 string for
if (($user_rating >= 1) and ($user_rating <= 10))
2)components\com_flexicontent\classes\flexicontent.helper.php
.'.$class.' .fcvote ul {height:'.$dim.'px;width:'.(10*$dim).'px;}

some strings below add 5 new strings:
Code:
<li><a href=\"javascript:void(null)\" onclick=\"javascript:FCVote(".$id.",6,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JText::_( 'FLEXI_VG1' )."\" class=\"six\">6</li> <li><a href=\"javascript:void(null)\" onclick=\"javascript:FCVote(".$id.",7,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JText::_( 'FLEXI_VG2' )."\" class=\"seven\">7</li> <li><a href=\"javascript:void(null)\" onclick=\"javascript:FCVote(".$id.",8,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JText::_( 'FLEXI_VG3' )."\" class=\"eight\">8</li> <li><a href=\"javascript:void(null)\" onclick=\"javascript:FCVote(".$id.",9,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JText::_( 'FLEXI_VG4' )."\" class=\"nine\">9</li> <li><a href=\"javascript:void(null)\" onclick=\"javascript:FCVote(".$id.",10,".$rating_sum.",".$rating_count.",'".$xid."',".$counter.");\" title=\"".JText::_( 'FLEXI_VG5' )."\" class=\"ten\">10</li>

in \components\com_flexicontent\assets\css\fcvote.css
replace old styles for this:
Code:
.fcvote li a.one{ margin: 0; padding: 0; width: 10%; z-index: 10; } .fcvote li a.two{ margin: 0; padding: 0; width: 20%; z-index: 9; } .fcvote li a.three{ margin: 0; padding: 0; width: 30%; z-index: 8; } .fcvote li a.four{ margin: 0; padding: 0; width: 40%; z-index: 7; } .fcvote li a.five{ margin: 0; padding: 0; width: 50%; z-index: 6; } .fcvote li a.six{ margin: 0; padding: 0; width: 60%; z-index: 5; } .fcvote li a.seven{ margin: 0; padding: 0; width: 70%; z-index: 4; } .fcvote li a.eight{ margin: 0; padding: 0; width: 80%; z-index: 3; } .fcvote li a.nine{ margin: 0; padding: 0; width: 90%; z-index: 2; } .fcvote li a.ten{ margin: 0; padding: 0; width: 100%; z-index: 1; }


and in
components\com_flexicontent\assets\js\fcvote.js

document.getElementById('rating_'+id+'_'+xid).style.width=parseInt(percentage*10)+'%';

and (optional) you must add/change some strings in lang file (\language\en-GB\en-GB.com_flexicontent.ini - for English language)

FLEXI_VG1=6
FLEXI_VG2=7
FLEXI_VG3=8
FLEXI_VG4=9
FLEXI_VG5=10
Last edit: 15 years 4 months ago by effrit.

Please Log in or Create an account to join the conversation.

More
15 years 4 months ago #10362 by micker
thanks it's a great tips !
becarfull before update your flexicontent !
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
15 years 4 months ago #10490 by F0l2saken
I have confirmed this works perfectly, thank you!

Please Log in or Create an account to join the conversation.

More
15 years 4 months ago #10491 by F0l2saken
B-T-W you can then modify the module aida news to show a 10 rating rather than 5, I can't remember what line it was, but in the module where it displays the number you put *2 so it multiplies it by 2

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #17907 by GamerLive
Hi all I followed the tutorial to make max stars 10 rather than 5 on rating.

That makes me 10 out of votes, the translation works well and when all goes well vote only one time we update we see that it multiplies the rate under 5 by two.

Example : I put a 4 of 10 in a document that shows good 4 / 10 star but after updating I have an 8 / 10 on this document. :?

I redid the changes two times and found no change. Need help please: cry:

Sorry for my english... :?

Portail communautaire sur l'univers des consoles Sony entièrement réalisé avec Flexicontent.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #17943 by ggppdk
I will put it as a feature enhancement in bug tracker.

And it will be examined to be included in a future version.

If i find time i will look at it and answer you, can not promise. Too much work on 1.5.6 and 2.0 and other obligations too.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #17971 by GamerLive
Thank you for that answer we would really like for members to record on 10 to be more cohere with the editorial note. We are currently redoing our website with full FLEXIcontent actually offers us great opportunities, we are working on alternative accommodation in order not to disrupt our members and hope to have finished by September, but this component is so powerful that we have new ideas every day.

Sorry for my english

Portail communautaire sur l'univers des consoles Sony entièrement réalisé avec Flexicontent.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #17972 by ggppdk
I am looking at it now, if it doesnot break compatibility maybe i will parametrize this, and include it in next version too.

I will post back

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #17999 by ggppdk
I looked at it but i am having some trouble with javascript modifications, no time to look at it now, saved the files to try later.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save