Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using Voting API 6.x-2.3 and Views 6.x-3.x-dev, and find that in admin/build/views/edit/ I can only add a Vote related Argument for the user who casted the vote.
So for instance I cannot have automatic listings of 5-star-votes, 4-stars-votes and so on for a given node.
In order to get this options, you just need to add the following to votingapi.views.inc at line 62:
line 49:
// value
$data['votingapi_vote']['value'] = array(
'title' => t('Value'), // The item it appears as on the UI,
'help' => t('The value of an individual cast vote.'), // The help that appears on the UI,
// Information for displaying a title as a field
'field' => array(
'handler' => 'votingapi_views_handler_field_value',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
line 62:
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_numeric',
+ ),
...
'sort' => array(
'handler' => 'views_handler_sort',
),
);
I'm sorry I don't have time right now to go through git instructions and provide a reliable patch.
Hope this may help someone.
Comments
Comment #1
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedthanks for this. I will try it out.
Comment #2
legolasboDrupal 6 is no longer supported. Closing old issues to clean up the issue queue.
Please reopen and update this issue if this is still an issue in the D7 or D8 version.