problem percentage
-
If I insert %%RATINGS_PERCENTAGE%% , the percentage exceed 100% . How can I get a maximum score of 100 without going over ?
-
I can’t reproduce the problem on my end https://lesterchan.net/wordpress_dev/2015/03/05/hello-world/
Looks like the ratings data of your post is somehow corrupted.
It is calculated using the
( ( Ratings Score / Ratings Users ) / Max Ratings ) * 100Max Ratings is default to 5.
You can get the ratings score and ratings users of your post under the custom post field in the edit post page and calculare yourself to see if it is more than 100%.
I have this code , so it’s ok:
$post_ratings_percentage = round((($post_ratings_score/$post_ratings_users)/$ratings_max) * 100, 2);See my screenshot please. Is this the problem ?
Yes, it is use up/down ratings, percentage will not be your best bet because there is a -1.
You can easily solve this defect ?
Can I replace -1 with other things ?Actually come to think of it, it will not exceed 100, are you able to reproduce this problem on all posts or only 1 post?
Because if you have 20 ppl rated, 19 of them rated +1, 1 of them rated -1.
The score is ((18/20)/1)*100, it gives you 90. So I think the score of your post is corrupted. Probably because you switch it from a 5 star rating to a up/down rating.
i have reset the counter because before i used also rating 5 stars.
Currently the first positive vote is 50,00.
The first negative vote is -50,00.
Is it correct?It would be a better percentage from 0% to 100%. š
Just set it back to 0 for ratings_users, ratings_score and ratings_average under the post custom field of that post.
ok I reset all, but the problem remains.
If I vote UP for the first time should be 100 and instead appears 50.
If I vote DOWN for the first time should remain 0 and instead appears -50.
In my opinion , the calculation is wrong š
I think you have mistaken. If you vote up, it should be +50 and if you vote down it is -50. I am referring to the score here.
So first time if the score is 0, vote up will make it 50 and the second time if you vote down, it should be -50 and hence the score is now 0. If there is a third vote comes in and it is a vote down, the score will be -50
This plugin is designed as a score based system, not much of a thumbs up and down. That thumbs up and down is added later as a after thought. Also the percentage is meant to use for the 5 star rating and not for the thumbs up and down
ok , then I will not use the percentage , but only the score .
Furthermore , it is possible to show the number of Up and Down in the number of separate way ?
For example:
“Do you like this post ?
YES: 100 vote .
NO: 3 vote .”I solved the problem . I have eliminated this code:
/$ratings_max from percentage.Furthermore , is it possible to show the number of Up and Down in the number of separate way ?
For example:
“Do you like this post ?
YES: 100 vote .
NO: 3 vote .”Sorry that is not possible because as mentioned, the thumbs up and down are added as an after thought, so that can’t be done because individual counting of the star ratings is not needed.
ok, no problem. And the color change?
For example:
– percentage less than 60% turn red.
– percentage above 60% turn green.Is it possible?
Sorry that is not possible. What you see is what you get from the plugin. If you need your own feature you can hire your own developer to modify it =)
The topic ‘problem percentage’ is closed to new replies.