Closed (fixed)
Project:
Fivestar
Version:
5.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2008 at 21:34 UTC
Updated:
2 Aug 2010 at 20:52 UTC
Hi,
I've created a custom content type and using fivestar there. It works great, so thanks a lot for this superb module!
But how do I build a block which is containing a ranking list for example of the 5 most rated notes. It would be perfect to select a taxonomy category for this but this is additional.
Cheers,
Andy
Comments
Comment #1
vm commentedinvestigate the views.module
Comment #2
quicksketchAgreed. http://drupal.org/project/views
Comment #3
quicksketchComment #4
geerlingguy commentedI wanted to add to this: I have views, and enabled a block that sorts by the highest rating, or by the highest number of ratings, but it's really hard for me to come up with a way to sort results by (a) highest number of ratings with (b) highest average rating.
Is there any way the module could have one or two views-enabled blocks install by default when a user installs the module? That would be oh-so-helpful to those who don't know about relationships, much less how to build a custom view from scratch.
Comment #5
quicksketchSee http://www.lullabot.com/videocast/building-views-fivestar-and-votingapi
Comment #6
geerlingguy commentedI just finished watching it, and I'm a little confused - can I set up two relationships, one to get the average for a given node, and another to give the number of votes (total), then use views to sort first by the number of votes, then by the average rating of the node?
I'm trying on this site: www.lolsaints.com in the right sidebar, under "Highest Rated", but I'm scratching my head on it a little...
[EDIT: Aha! I did what I said up above again, being sure to use views' "Label" for each function (I called one of the relationships "Average" and the other "Vote Count" to differentiate the two), then sorted them first by vote count, then by average, and, lo and behold, it works!]. Go ahead and mark this one closed again. :-)
Comment #7
geerlingguy commentedMarking as closed again. That's the quickest support I've ever gotten on Drupal.org!
Comment #8
CFW commentedI visited your site today and i like it, but how to setup the Highest Rated block as on your site? I followed the instructions in the movie but it says nothing about a block with the Highest rated stories. Any help would be great...
Thanks,
Comment #9
vm commentedyou can set the sort order of your view to descending and limit the view to 5 while filtering only stories as a content type.
Comment #10
vm commentedyou may also want to investigate already existing views which are disabled and find one suitable. clone and edit to suit.
Comment #11
CFW commentedI have done that and now i have a block with top rated stories. Thanks.
Comment #13
seanberto commentedHey VM,
I could be totally wrong here, but I don't think that the top-rated view that's included with Fivestar serves this person's purpose (or mine). In my mind, the highest-rated post should have the highest total score (average score x # of votes cast, or total # of points earned). The average score alone doesn't differentiate between a post that get's five "5"s and one that gets 3 "5"s. Again, I could have things configured incorrectly, but I can't seem to create a view that shows the highest ranked node based upon total points.
Cheers,
S
Comment #14
smzur22 commented@seanberto
yeah. I'm having the same problem
Comment #15
vm commentedat that point you may have to dig deeper into the way votingapi works if you want a different method to sum and average total voting.
Comment #16
egill80 commentedI have a five-star block where i am listing the best rated products in views. in fields i have title, image and vote results:value in vote results relationsship.
i get the stars but want to include the total number of votes behind like this: four stars of five (30 votes).
i tried all the option within views but no luck,
does anybody have a clue?
thx in advantage
Comment #17
glitz commentedhi
i was wondering if you got this to work? Im trying to do the same// if so, could you attach how your view is configured?
THANKS