this is related to the issue around distinguishing nodes with a sum of points adding to zero from nodes with no votes at all (#209865, #200659, among others)

we found it sufficient to be able to do this in the theme by displaying "no votes" when that's appropriate. the problem is that the votingapi result is cast as an integer in the vote_up_down preprocess function. we can just rerun the relevant query in the theme code, but it would be nice to avoid that hit and store the original results.

the change would be to add a "raw_points" (or whatever name you prefer) variable that would be available to the vote_up_down_points.tpl.php file.

i'm attaching a patch made against the 1.x version. i looked at the 2.x code and it seems like there is a similar point in there - i can supply a patch for that as well if you'd like.

thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marvil07’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Needs review

No more features to 6.x-1.x, please take a look to the update on the project page.

marvil07’s picture

Status: Needs review » Fixed
FileSize
1.8 KB

thanks for the patch!

I just made it apply against 2.x, and then committed to both 2.x and 3.x branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.