Basically, I'm going to be displaying a list of users who have voted on a node, but then show in a modal what their rating was. Now I can use the voting api to get what they voted, but I can't generate a display only widget for what they voted based on the user ID.

Any ideas? This is the function from the Rate module.

 * Generate a widget.
 * @param int $widget_id Widget id
 * @param string $content_type "node" or "comment"
 * @param int $content_id Node id (nid) or comment id (cid)
 * @param bool $teaser
 * @param bool $include_div
 * @return array
function rate_generate_widget($widget_id, $content_type, $content_id, $mode = RATE_FULL, $include_div = TRUE, $just_voted = FALSE, $displayed = NULL) {}
  • i think you should try out views module for it
    – harshal
    Dec 26, 2013 at 7:07
  • @harshal I've tried, but it just doesn't work out the same. Dec 26, 2013 at 13:52
  • pls let me know how have u used views for this
    – harshal
    Dec 26, 2013 at 16:25
  • So I used Views to create a list of users who have voted on a node, grouped by what their rating was, and that works fine. The issue is showing all the other ratings given on the same node by individual users in like a popup or hover that looks something like this Dec 26, 2013 at 16:53

1 Answer 1


What i understand that you want to display that Current logged in user Content ratings. for that you can use the (Votes) Votes: Current user (True) for filter enter image description here and if you want to display all the voted content User-wise than you can Make a relation with (Votes) Votes: User and remove the (Votes) Votes: Current user (True) as the following image. enter image description here

  • Not quite. I want to show the individual ratings from the current user's friends who have voted. Jan 8, 2014 at 14:39
  • So how do you make the relation with the friends.
    – madhurjya
    Jan 8, 2014 at 15:01
  • So with this View, it shows a list of the current user's friends who voted on the current node using contextual filters. Now I can add their individual ratings for that node using Views Field View, but it's not very clean and the markup is terrible, so I'm trying to find a much cleaner process. Jan 8, 2014 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.