[SOLVED] Voting star

More
11 years 1 month ago - 11 years 1 month ago #40580 by binbenik
Hello,

I've installed Joomla 2.5 and Flexicontent 2.1.0 r1778 with a french translation.
I've enable the vote and it's working.

My issue is when the tooltip appear on the star, it's not the correct description.
On the 1st star appear: 1/5 Insuffisant (Poor)
On the 2nd star appear: 2/5 Moyen (Average)
On the 3rd star appear: 3/5 Bien (Good)
On the 4th star appear: 4/5 Trés bien (Very good)
On the 5th star appear: 5/5 Très bien (Very good)

But I want the following:
On the 1st star appear: 1/5 Trés mauvais(Very bad)
On the 2nd star appear: 2/5 Mauvais (Bad)
On the 3rd star appear: 3/5 Moyen (Average)
On the 4th star appear: 4/5 Bien (Good)
On the 5th star appear: 5/5 Très bien (Very good)

I know where to change the description in the translation file but it's the same for the 4th and the 5th stars.

In the translation file:
FLEXI_VERY_POOR is not used (perhaps for 0 star)
FLEXI_POOR is used for 1st star
FLEXI_REGULAR is used for 2nd star
FLEXI_GOOD is used for 3rd star
FLEXI_VERY_GOOD is used for 4th end 5th star

Do you know where I can change ta make a difference between 4 an 5 stars ?

Hope I describe correctly my issue.
Thank you.

Frédéric
Last edit: 11 years 1 month ago by binbenik.

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

More
11 years 1 month ago #40589 by ggppdk
Replied by ggppdk on topic [SOLVED] Voting star
Hello

FLEXIcontent can show more than 5 star and can have half or quarter star voting (you may read popup description of parameters, this is better for new sites, for existing sites you will need to execute an SQL query)

About your question
Code:
if ($star_percent < 20) $star_tooltips[$i] = JText::_( 'FLEXI_VERY_POOR' ); else if ($star_percent < 40) $star_tooltips[$i] = JText::_( 'FLEXI_POOR' ); else if ($star_percent < 60) $star_tooltips[$i] = JText::_( 'FLEXI_REGULAR' ); else if ($star_percent < 80) $star_tooltips[$i] = JText::_( 'FLEXI_GOOD' ); else $star_tooltips[$i] = JText::_( 'FLEXI_VERY_GOOD' );


so yes when you try to set 1 star that is 20% so you get 'FLEXI_POOR' but if you set half star voting then you can get less than 20% which FLEXI_VERY_POOR


-- 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...

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

More
11 years 1 month ago #40594 by binbenik
Replied by binbenik on topic [SOLVED] Voting star
Ok, I understood.
I changed the resolution to 10 and I updated my database with success. But I have the same problem.
I see the FLEXI_VERY_POOR only for the 1st half star and I want to have it for the 1st star completly.

Finally, I changed the code in flexicontent.helper.php to have the <= instead of < and it's working like I want.

I think I will need to change it again if I upgrade ...

Thanks for your quick reply.

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

More
11 years 1 month ago #40603 by micker
Replied by micker on topic [SOLVED] Voting star
Maybe duplicate your field and rename ...
www.flexicontent.org/documentati ... -type.html
no problem on update !
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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.308 seconds
Save
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