Closed (duplicate)
Project:
Fivestar
Version:
7.x-2.x-dev
Component:
Documentation
Priority:
Critical
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
8 Dec 2011 at 11:50 UTC
Updated:
26 Feb 2014 at 07:46 UTC
Jump to comment: Most recent
Comments
Comment #1
TSC_2010 commentedI'm also interested in this topic. I figure there is a way to use the computed field module in order to get an overall average of different rating widgets on one node, comment, etc.
Comment #2
Refineo commentedsub
Comment #3
ericduran commentedI'm curious as to what the use case is?
If you where to be doing this with multiple comments being targeted at a single node then yes, this is possible.
But getting the overal rating for a tag accross multiple nodes is not possible.
You could do this with writing your own query against votingapi or using the votingapi functions. But fivestar would probably never do this.
I'm willing to hear the use case for it, to see if I can provide some guidance. Hope this helps.
Comment #4
Refineo commentedHello,
First of all, thank you for this module.
Here is the use case.
For my restaurant review website case I would like users to rate 3 different qualities of restaurants: staff, food, interior.
These detailed ratings can be visible on node pages. However I would like to show the list of all restaurants sorted using a calculated overall rating criteria:
(example)
overall rating=(w1*staff + w2*food + w3*interior)/ (w1+w2+w3)
where w1, w2, w3 are weights
It would be great to display this as fivestar rating as well.
Comment #5
ericduran commentedI see, So right now you can have the tree different rating assuming you used a different 'axis' name.
The thing that I just don't see us doing if getting the sum of different axis (aka staff, food, interior). This seems like a pretty specific usecase, and the odds are that other people would want to weight there values differently.
That being said this is perfectly doable if you query the votingapi data directly. Then you can just display those values in the fivestar display. It would required some custom code.
Sadly I don't see a way of doing this generic enough for everyone :-(
Comment #6
ayesh commentedI randomly came here while searching for a different problem but here are my thoughts.
As the OP wants to have different nodes, it looks like he is trying to get the functionality of a "review" node that they rate the restaurant.
This is just a perfect use case for rating target setup, so if you want to allow users to vote to another entity remotely, make use of it.
Currently FiveStar supports Node References (References module), User references and Node->Comment relationships.
As for voting on a different axis, there is no built-in way (hopefully, yet) to populate a field using the module, but you can easily put some tiny php code to display an average in a same-looking fivestar bar.
Related: #335493: Vote-averaging for multi-axis
Document page: http://drupal.org/node/1308114
Sorry if this is not what you were looking for.
Comment #7
IWasBornToWin commented@ericduran - i've seen other pages asking for the same solution - overall results, none have ever been answered. He is asking the same here. This is not an isolated request. I will give you the common requests I've seen which is the same as mine.
here are a few links - http://drupal.org/node/1041110
http://drupal.org/node/1299784
1 content type, different nodes, different node authors.
And using the original posters example - what if the same author listed 5 restaurants and wanted each one reviewed at its own node and then the we wanted to show the restaurant owner's overall rating?
another example - product content type and nodes. one author has 3 different product nodes. Fivestar tag is product.
three different rated products but we want to show the author's over all rating by adding all the votes from all of that authors products. I've seen this request all over the site. and as i said, some are almost two years old and have never been answered. Any suggestions op ow to do this? I will use compute field or whatever i need to use. I just want to show it in a view. Even if i can query voting api i need to use fivestar to show end uer the nice display rather than something like 3.8 avg (26 votes)
Thank you
Comment #8
IWasBornToWin commentedAnd here's another unanswered request, there are many more but i hope you get the point, there are plenty of us needing, desperately to get overall totals...any way possible.
http://drupal.org/node/1231220
I'd be willing to chip in if this is something which can be written
Comment #9
moshang commentedi guess this will help
http://drupal.org/node/1308114
btw, im not sure if there is a problem in the module since when i tried this.
it only record the latest vote (only one vote will be recorded)
then i changed the line 133 of the module to let it pass in the uid (it is set to null originally).
i still have problems of deleting comments and vote multi times. if ppl delete a comment, the average vote will mess up.
looking for solution for this problem.
Comment #10
whiteph commentedSee Vote-averaging for multi-axis