I posted this on the forum
http://drupal.org/node/101749

then thought maybe it should have gone here.
-------

Using the most excellent Vote Up/Down and Views modules:

Added the field 'Individual vote value' to my custom view page- it works great, except it removed all nodes without a vote- ie new nodes have default vote value = NULL, rather than zero. I'd like these nodes to still be listed on the Views page with votes=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,
j

Drupal Rocks.

Comments

justin3’s picture

Status: Active » Fixed

hickory gave me the answer in the forum, so i thought i'd follow up here. Should this patch be applied to the module default?

http://drupal.org/node/63430
comment #7

-------------------
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)");
------------------

Anonymous’s picture

Status: Fixed » Closed (fixed)