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

vm’s picture

investigate the views.module

quicksketch’s picture

quicksketch’s picture

Status: Active » Closed (fixed)
geerlingguy’s picture

Status: Closed (fixed) » Active

I 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.

geerlingguy’s picture

I 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. :-)

geerlingguy’s picture

Status: Active » Closed (fixed)

Marking as closed again. That's the quickest support I've ever gotten on Drupal.org!

CFW’s picture

I 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,

vm’s picture

you can set the sort order of your view to descending and limit the view to 5 while filtering only stories as a content type.

vm’s picture

you may also want to investigate already existing views which are disabled and find one suitable. clone and edit to suit.

CFW’s picture

I have done that and now i have a block with top rated stories. Thanks.

seanberto’s picture

Hey 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

smzur22’s picture

@seanberto
yeah. I'm having the same problem

vm’s picture

at 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.

egill80’s picture

I 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

glitz’s picture

hi

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