If would be great if their was a "total score" option in this module. The total score formula would be stars x votes = total score. I think this would give a more accurate view of a nodes popularity. The total score would also be selectable in views for sorting.

Comments

quicksketch’s picture

Project: Fivestar » Voting API
Version: 5.x-1.9 » 5.x-1.6

I'll let Eaton consider this. I'm not sure where this "Total score" would really show up, other than in Views. It's easy enough to retrieve this score manually by using VotingAPI's functions to retrieve the current votes on a node then doing the math yourself.

totaldrupal’s picture

Thanks for considering it. I really like the module but my main issue for a "total score" option is in sorting the view. If you want to show which node is most popular sorting by total votes or number of stars does not reflect it well. If you sorted by votes, it's possible for a node to have 100 votes for one star and be at the top. And if you sorted by stars it could have five stars and only one vote and be at the top. Do you see my problem in trying to show most popular?

ahoeben’s picture

I agree with the feature request. (I'ld say '+1' if it weren't for certain people's dislike for doing so ;-)

This feature is necessitated by a usability issue with the 5 star rating concept. If a user thinks a node does not even deserve 1 star, no vote will be cast, even though the user means to give it 0 stars, or a score of 0%. I am not saying that 5 star voting should somehow be changed, but votingapi could be changed to cater for this situation.

Code changes would be mostly in 'votingapi_views.inc', unless it is decided to add a cached value for the accumulated score.

Scott Reynolds’s picture

Project: Voting API » Fivestar

This sounds to me like a FiveStar module thing.

For totaldrupal's issue, FiveStar should be able to do both Avg voting and Points voting. Points would reflect the number of stars selected and Avg would reflect the perctange from the translated stars

@ahoeben
Not sure that this is what this issue is about at all. You confused me :-D. But to your point, shouldn't FiveStar allow 0% ?

I suggest quicksketch to reconsider this...

quicksketch’s picture

For totaldrupal's issue, FiveStar should be able to do both Avg voting and Points voting. Points would reflect the number of stars selected and Avg would reflect the percentage from the translated stars

Fivestar will never support points. Stars make no sense for this purpose. You can't average "points" into something like "3.5 stars", it's a completely different ranking system. Also, note that neither Amazon nor iTunes (or any other voting system I've ever seen) supports voting "0 stars".

I also realized my initial suggestion of (number of stars) * (number of votes) doesn't make any sense either. In such a system, something that received 6 single stars would rank higher than something that had 1 five star ranking.

ahoeben’s picture

> In such a system, something that received 6 single stars would rank
> higher than something that had 1 five star ranking.

This actually *does* make sense. You have to wonder why 5 out of 6 persons who voted one star for a node did not think that that other node was worth any stars.

Scott Reynolds’s picture

Version: 5.x-1.6 » 5.x-1.x-dev

Fivestar will never support points. Stars make no sense for this purpose. You can't average "points" into something like "3.5 stars", it's a completely different ranking system.

Sorry if I wasn't clear. I setting would be introduced, that tells FiveStar what votingapi type it is (avg, or points). If points was selected, it would use votingapi point system and thus 3.5 stars = 3.5 points? Thus you can get the count of points (2 votes, 1 with 2 stars and the other with 4.5 stars, the votingapi sum result is 6.5). There is no 'average' in points system.

That gives you a simple metric to gauge the popularity of a node. If a node has one vote but its 5 stars, it would be lower then the node with 6 votes with 1 star.

Is that desirable? Not sure. Lots of better solutions out there. All of the other solutions would involve creating a different votingapi calculation module that hook_votingapi_calculate().

This feels like one of those things that just is over-thought idea. My only thought is maybe FiveStar would want to use points system in votingapi. maybe

totaldrupal’s picture

Yes, I think your idea above would work. If stars were points and the "total score" would be the sum of the points. Sorting could be based on the sum of the points.

ahoeben’s picture

IMHO, 'percentage' or 'points' is a tom[A]to/tom[ah]to thing. Having an option in fivestar to use points would solve my current problem though, so I support that idea.

Ofcourse it could break horribly if you change from one setting to the other if votes have already been cast...

quicksketch’s picture

If anyone can provide any existence of a point-based star system that might be helpful. I generally dismiss the idea because people are stretching the concept of what star rating systems are used for. Digg is not stars, Vote up/down systems are not stars. The good reason being that stars are not very suitable to that cause.

Scott Reynolds’s picture

there datasets: http://www.grouplens.org/node/73 are all in number of stars. I would take that as meaning the movielens site uses points as well. Netflix as well... but you have to sign up for that data set. You can see the breakdown here: www.cs.pomona.edu/classes/cs062/assignments/asgt12.pdf

In actuality, points system makes quite a bit of sense in terms of stars. Percentage is actually more artificial in a sense, (not the least of which is because it requires that you do math to come up with the value). where points would just be a straight write to the db.

And to the point of changing from points to percentage and vice-versa, thats really simple. you know the range of points, and you have all the votes. You just translate 3 points (out of 5) into 3*.2 = .6.

Having thought about it some today, I happen to feel that it is more natural to consider stars in this manner then in percentage.

quicksketch’s picture

Status: Active » Closed (won't fix)

I'm not implementing this. Patches will be considered.

paganwinter’s picture

Is it possible/easy that the fivestar code can be cloned to do something like that. That is, store points instead of percentage.
I am looking for functionality like Blogger's "Reactions". It's more like a poll, which shows the total no. of votes for each poll option (which can be emulated with stars and the little description that goes with each star).

ezra-g’s picture

Version: 5.x-1.x-dev » 6.x-2.x-dev
Status: Closed (won't fix) » Active

I marked #891854: Support 'points' or other non "percent" value_type as a dupe of this. Seems like there's a reasonable amount of demand for this feature.

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new3.72 KB

This may need some revision in fivestar.js, but here's what a site-wide setting would look like.

weka’s picture

+1

weka’s picture

I wanted to test your patch ezra-g so I applied it against the latest 6.x-2.x-dev available through the Releases for Fivestar page but the patch failed with errors.
Hunk #1 FAILED at 311.
Hunk #2 FAILED at 358.
Hunk #3 FAILED at 705.
3 out of 3 hunks FAILED
Of-course I may be doing something wrong ;-)

ezra-g’s picture

StatusFileSize
new14.04 KB

Ignore this comment and patch, I meant to post this at http://drupal.org/node/786224#comment-4049938

weka’s picture

Marked #594868: Support different values? as a duplicate of this feature request.

ezra-g’s picture

StatusFileSize
new5.8 KB

Here's a revision that addresses some situations where we would divide by 100 if the value type were percent, but not if it were points. This results in vote point values corresponding to the star number, rather than those values normalized between 0 and 100.

This also changes the value_type to radios, rather than a free entry text field so folks don't get too crazy with the value here.

I've verified that this applies the latest of the 2.x branch from CVS.

ezra-g’s picture

StatusFileSize
new9.57 KB

This revision adds some changes to the frontend (mainly fivestar.js) to account for points instead of percentages.

This could use more testing in both points and percentage modes.

weka’s picture

Thank you for the patches Ezra, I will test these as soon as possible.
Right now as a workaround I am using the Views Custom Field module to recalculate the percentage back to points. Unfortunately only the DEV version supports sorting using the custom PHP field.

Taxoman’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
ericduran’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

Moving back to 6.x there's already a patch in the queue. That should at least be tested and review.

sappling’s picture

Version: 6.x-2.x-dev » 6.x-1.19

Is this supposed to be supported in 6.x-1.19? I see a "Total score" aggregation function there, but it does not seem to work. I always get a value of 0 as a result.

Status: Needs review » Needs work

The last submitted patch, fivestar-value-type-points-c.patch, failed testing.

Energyblazar’s picture

just a suggestion why dont you guys user Voting Rules module along with rules and fivestar.....then u can do anything with fivestar...

whiteph’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Sorry, Drupal 6 is end of life, and is no longer supported.