I really tried to figure this out before posting here. I'm using options (emotions) to rate a node. I've created a view and I want to display information about the votes in the view. I understand the basics of this (adding the vote results as a relationship). I'm confused though how to either display the most voted emotion, or a count list of the emotions, for instance;

happy:10
sad: 5
grumpy:2

it seems like the widget does this, and idea how I might do this using views and fields?

Comments

gangaloo’s picture

subscribing. I would be interested in this as well. I've tried adding a relationship according to the README.TXT but no luck.

mctwist’s picture

Do you have a View set up for this that you're working on? If so, is it currently displaying the widget in the view?

If you want to add a second field that displays the number of votes, you need to add a second instance of a Vote Results relationship. This second relationship will have different Data Filters than the first. When you add that second field that displays the # of votes, you will assign this 2nd relationship to that (give it a different name when adding the relationship to avoid confusion).

On mine, I have a field to display the Thumbs Up/Down widget, and it uses a Vote Results relationship with the data filters: Points, Normal Vote, Average Vote. I then added a 2nd Vote Results relationship (named it "Number of Votes") and used the data filters: Points, Normal vote, Number of votes. When you add the second Vote Results: Value field, just set the relationship to this new one.

gangaloo’s picture

mctwist,

i got my view working. yay! it was just a matter of tinkering until i got the result i needed it. my way to debug was to add every field (vote related) and view the results in the table or grid. by observing the values on each field, I was able to dissect what was going on. i then modified the vote results relationships and checked what values changed in the fields. i was able to see how changing the vote results relationship values changed the field results.

this is a long path but it really helped me see whats going on with the data.

cheers!

mctwist’s picture

Are you having any trouble sorting these views? Here's the deal: I set the sort criteria to Vote results: Value (Points/Normal Vote/Average Vote), then Number of Votes (Points/Normal Vote/Number of Votes), and finally Post Date. I then exposed all 3 sorts. Number of Votes and Post Date sorting are fine, but the default view's sort - the average vote - makes no sense to me. Clearly, the items are correctly being sorted from highest percentage to lowest percentage, but I can't figure out what the 2nd sort criteria is if there are many items with the same percentage.

The item that tops the list is supposed to be the one with the highest average vote with the most number of votes posted most recently. It only obeys the first sort criteria. As far as I can tell, there is no pattern as to how the group of 17 100%-average-vote items are arranged. The one with the most votes is ranked 2nd, the one with the second highest amount of votes that was posted most recently is ranked 15th. The the one that should come in 3rd (same amount of votes and posted longer ago than #2) is actually a tie between two, but they are ranked 7th and 10th.

Do you see the madness? :O

Valeratal’s picture

I have widjet Yes No

I created field that displays the number of votes

But, how creat field that display only "Yes" (becouse "number of votes" not relevant)

ivnish’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 7 is EOL. Issue will be closed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.