I don't know why, but nothing for the VotingAPI shows up in Views. I tried reinstalling Fivestar/VotingAPI, I'm using the latest version of views and VotingAPI (I even re-downloaded it), nothing seems to work, though. VotingAPI and Fivestar sections do not appear in Views whatsoever, not in the Filters or Fields or Sorting.

Ideas?

Comments

eaton’s picture

Have you added a 'relationship' to the View? VotingAPI stores a large amount of data, making it necessary to use 'relationships' to set up links to just the stuff you need. Once you add a relationship, you can add the fields/filters/sorts/etc.

SpikeX’s picture

Ah, that was the problem. But Fivestar still doesn't show up.

Let me explain what I'm trying to do. I have a node listing in a grid-style using CCK and Imagefield (sort of a "gallery", if you will). I'd like to be able to sort by "rating", that is, display the highest rated nodes first. If multiple nodes have the same score (say 4.5/5), I'd like it to then sort by the number of votes, so the one with the most votes displays first.

If possible, too, I'd like a static Fivestar display in each node listing, as well (in the grid, under the image).

Anonymous’s picture

This is what I did:

- add a Relation with Voting API, and make sure all filters have a setting
- save the view
- then go to Sort Criteria > Vote Results to add a sorting.

Thanks.

eaton’s picture

Category: bug » support

But Fivestar still doesn't show up.

'Fivestar' won't actually show up in the list of fields, sorts, etc -- it doesn't give any custom data to Views at all. All it provides is a formatter for fields so that 'value' fields can be displayed as stars. You'll need to add basic VotingAPI fields to get the data to show up.

Also, please ensure you're using VotingAPI 2.1, the latest version. The official releases have a number of fixes -- for value sorting in particular -- that were not present in the RC2 release.

SpikeX’s picture

Status: Active » Closed (fixed)

Ah, 2.1 is actually new (2 days ago), and I just heard about it now. I'll upgrade as soon as I get a chance, thanks.

avpaderno’s picture

Title: Views integration isn't working! » Views integration isn't working
Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.