By justin3 on
Using the Vote Up/Down and Views modules:
Added the field 'Individual vote value' to my custom view page- this removed all nodes without a vote. I'd like these nodes to still be listed, but with a value of 0.
Option 1: when a node is added it's given a default vote value of 0
Option 2: the Views page lists nodes without a vote as 0
I've tried many different variations in the views settings- ie filters, fields, arguments, etc... but so far i haven't found the solution. Am i missing an easy fix, or is this something that needs to be coded?
thanks
Drupal Rocks.
Comments
possible fix
Try the fix at #7 here: http://drupal.org/node/63430 - I haven't actually tried it yet, but this keeps coming up and people always point to that thread.
thank you so much
exactly what I needed. + Mucho Karma points to hickory
thanks again
(o ;
The Fix
------------------------
Ok, I went ahead and made a minor change to votingapi_views.inc on line 184 in function votingapi_views_value_query_handler() so that it would return nodes where there are no votes. Here's the change:
old: $query->add_where("$table.$column = '$value'");
new: $query->add_where("($table.$column = '$value') OR ($table.$column is NULL)");
-------------------------