WP Photo Album Plus[resolved] Feature Suggestion: toggle for Rating System to use 10 instead of 5 (21 posts)

1. martinperreault
Member
Posted 2 years ago #

It would be fantastic if we could choose to use 10 stars instead of 5 for the rating system.
This would allow for a wider range in the ratings, and therefore provide a more precise ranking.
This is especially true when organising ratings contests

2. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

and therefore provide a more precise ranking.

The avarage rating as stored in the photo data is calculated with the computers precision. It is displayed with a maximum of 4 digits, like 4.667 on a photo on the Docs and Demos site, and ranges from 1.000 to 5.000. Increasing the number of choices will not essentially increase the ranking accuracy as long as there are more than a handfull of voters.

So, i dot agree.

3. martinperreault
Member
Posted 2 years ago #

Hi Opajaap,
Yes, I agree with you that the current system is very precise mathematically. I didn't express myself correctly.

What I meant to say, is that in terms of perception from the user's perspective, round numbers are often the number people remember. The difference between two ratings with lots of fractions is often less clear perceptually than two different whole digits. For instance, the following two examples:
4/5 and 4.5/5
VS
8/10 and 9/10

The difference in perception is even more apparent when the ratings have a lot of fractions.

But there is also one more factor in the reason why I proposed a 10 digit rating instead of 5. That's in the case where webmasters run a website where users tend to not want to rate below 50%. For instance, I run a FAN SITE for a model. The Fans obviously are present on the website because they like the model. When it is time for them to rate the photos of the model, they will never rate under 3/5 because for them, they like the model so much they would never disrespect her by rating the photos under 50% rating. This leaves them with only 4 & 5 out of 5 to rate the images, which then yields results that all appear to be very similar with a lot of fractions.

If on the other hand those users had a 10 digit rating system, then they have between 5/10 to 10/10 "available" to them, which yields clearer results perceptually. This is the part where I meant it would be "more precise".

I still hope you will consider including this feature in the plugin. Perhaps webmasters could have a toggle in the settings to choose between 5 or 10 stars rating. I know it would be very useful to sites like the one I operate, and perhaps it would be very useful to others as well. Of course, the 10 star rating system could also have fraction (perhaps limitted to 2 fractions instead of 4, for something like: ie: 7.14/10).

Best wishes, and thank you again for your great plugin.

Martin Perreault

4. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

Ok, the visitor psychology wins it from my mathematical approach.
I will implement it.
Do you need the ratings to be converted when switching from the one system to the other?

5. martinperreault
Member
Posted 2 years ago #

Thank you opajaap. This is much appreciated.

Yes, a conversion from the current 5 star ratings to 10 star ratings would be nice when the webmaster chooses to toggle the 10 star rating system.

I don't know how many fractions you think would be best to include in the 10 star rating system. I was thinking 2 might be a good number (like 6.24 , 7.57, etc...)

Cheers!

6. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

Fixed in 4.4.6 Available.

7. martinperreault
Member
Posted 2 years ago #

Thank you opajaap!

I installed the update and now the 10 star system is active, as I can see on each photo.

Nore that the current existing ratings were not updated to the 10 star rating system. They still appear, but they have their old ratings from the 5 star system, which means that a photo someone rated 5/5 now appears 5/10 instead of 10/10 (converted value).

Is there a way to update those values?

Best wishes,

8. Karesansui
Member
Posted 2 years ago #

After I installed this new release, I got the 10-stars as default.
So I switched back to 5-stars again.

However now the ratings have halved.
I get only (±) half the number of stars but also the average-ratings are halved.

Just to be sure I did a "Recalculate ratings." but without the required result.

MOVED TO SEPARATE SUBJECT.....

9. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

I made an arror in setting the default value. There is a conversion tool. Each time you switch, the values are doubled/halved, but the initial default value is wrong.

I updated the plugin with the correct default value.

I will provide a patch to double/halve the values without changing the setting to correct this. It will be released today.

To be continued... (Sorry for this stupid error of mine)

10. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

In wppa-ajax.php on line 655 it reads:

``````}
}
wppa_recalculate_ratings();
update_option(\$option, \$value);
\$wppa['error'] = '0';
break;

default:
// Do the update only``````

If you 'comment away' `update_option(\$option, \$value);` as follows:

``````wppa_recalculate_ratings();
//		update_option(\$option, \$value);
\$wppa['error'] = '0';``````

You can switch from 5 to 10 and backwards, including the conversion, but without setting the option value.

The other way is also possible: changing the 5-10 setting without doubling/halving the ratings:

Change:

``````case 'wppa_rating_max':
if ( \$value == '5' && \$wppa_opt['wppa_rating_max'] == '10' ) {
\$rats = \$wpdb->get_results(\$wpdb->prepare('SELECT <code>id</code>, <code>value</code> FROM <code>'.WPPA_RATING.'</code>'), 'ARRAY_A');
if ( \$rats ) {
foreach ( \$rats as \$rat ) {
\$wpdb->query(\$wpdb->prepare('UPDATE <code>'.WPPA_RATING.'</code> SET <code>value</code> = %s WHERE <code>id</code> = %s', \$rat['value']/2, \$rat['id']));
}
}
}
if ( \$value == '10' && \$wppa_opt['wppa_rating_max'] == '5' ) {
\$rats = \$wpdb->get_results(\$wpdb->prepare('SELECT <code>id</code>, <code>value</code> FROM <code>'.WPPA_RATING.'</code>'), 'ARRAY_A');
if ( \$rats ) {
foreach ( \$rats as \$rat ) {
\$wpdb->query(\$wpdb->prepare('UPDATE <code>'.WPPA_RATING.'</code> SET <code>value</code> = %s WHERE <code>id</code> = %s', \$rat['value']*2, \$rat['id']));
}
}
}
wppa_recalculate_ratings();
update_option(\$option, \$value);
\$wppa['error'] = '0';
break;``````

into:

``````case 'wppa_rating_max':
/*
if ( \$value == '5' && \$wppa_opt['wppa_rating_max'] == '10' ) {
\$rats = \$wpdb->get_results(\$wpdb->prepare('SELECT <code>id</code>, <code>value</code> FROM <code>'.WPPA_RATING.'</code>'), 'ARRAY_A');
if ( \$rats ) {
foreach ( \$rats as \$rat ) {
\$wpdb->query(\$wpdb->prepare('UPDATE <code>'.WPPA_RATING.'</code> SET <code>value</code> = %s WHERE <code>id</code> = %s', \$rat['value']/2, \$rat['id']));
}
}
}
if ( \$value == '10' && \$wppa_opt['wppa_rating_max'] == '5' ) {
\$rats = \$wpdb->get_results(\$wpdb->prepare('SELECT <code>id</code>, <code>value</code> FROM <code>'.WPPA_RATING.'</code>'), 'ARRAY_A');
if ( \$rats ) {
foreach ( \$rats as \$rat ) {
\$wpdb->query(\$wpdb->prepare('UPDATE <code>'.WPPA_RATING.'</code> SET <code>value</code> = %s WHERE <code>id</code> = %s', \$rat['value']*2, \$rat['id']));
}
}
}
*/
wppa_recalculate_ratings();
update_option(\$option, \$value);
\$wppa['error'] = '0';
break;``````
11. Karesansui
Member
Posted 2 years ago #

I commented out
// update_option(\$option, \$value);

And switched to 10 and back to 5 again.
Then recalculated .... but no change.

Did I miss this something ?
"but without setting the option value."

not sure what you mean here....

12. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

Switch to 10 to double the values. Then, remove the mod. The setting will remain 5, and the values correct.

13. Karesansui
Member
Posted 2 years ago #

Switch to 10 to double the values (with the mod).

This works. But now I am on 10-star-system.

Then remove the MOD and switch to 5-star-system gives me back halves again.

I guess, I'll wait for the fix....

EDIT: Just re-did. Double-checked and REFRESHed...
To 10-star with MOD ... and yes double-value's
Then back to 5-star without MOD ... but the value's then get halved again.

14. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

I will supply 4.4.7 in a minute. It has 2 actions in Table VII-13a and 13b (!) to correct it. Set the system to what yoiu want (5 or 10) and run VIII-13 a or b once or twice to get it right.

15. Karesansui
Member
Posted 2 years ago #

Back to normal again.

But mind you it is Table VIII 13a/b !

Thanks again.

16. martinperreault
Member
Posted 2 years ago #

Thank you. Works for me too.

17. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

18. martinperreault
Member
Posted 2 years ago #

I would advise against a drop-down menu for the rating. This requires 2 clicks to rate a photo, as opposed to having a direct one-click system like stars, or bullets []1 [2] [3] []4... Two clicks makes it an annoyance for the user when rating a series of multiple photos.

19. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

There will be more alternatives, it was just a try-out

20. martinperreault
Member
Posted 2 years ago #

no problem at all! I thought you were asking for feedback (above)?

Best wishes,

21. Jacob N. Breetvelt
Member
Plugin Author

Posted 2 years ago #

Yes, i like your feedback. Why not: Avarage a number, and my rating (if i can rate now) a row of stars, (numeric if i can not rate anymore). I do not like [1][2] etc or selection bullets

This topic has been closed to new replies.