Hi, Thanks for adding "Restrict to current user" with RC1, everything works fine. ^^

There is another thing that annoy me:

When nobody cast a vote, votingapi display "0" as defaut value instead of... nothing.

It's confusing because we can't make the difference between node with no value and node with 0 value (my users can put 0 like value).

So it's very important to not display zero value "0" when no vote is submit.

There wasn't this problem with drupal 5.x

Thanks again ^^

Julien

Comments

junro’s picture

Some news about this? :)

junro’s picture

Title: Not display zero value "0" when no vote is submit. » Not display zero value ("0") when no vote is submit.
Project: Voting API » Views (for Drupal 7)
Version: 6.x-2.0-rc1 » 6.x-2.1

Hum I'm moving this to Views, not sure but...

Maybe fixed in CVS too. ^^

eaton’s picture

Project: Views (for Drupal 7) » Voting API
Version: 6.x-2.1 » 6.x-2.x-dev

This is the formatting function for votingapi; Views doesn't have any control over it.

junro’s picture

Title: Not display zero value ("0") when no vote is submit. » Not display zero value ("0") when value is NULL

Hello,

I still have this problem,
I can't find how to Not display zero value ("0") when value is NULL...

I tried to take off 0 into the Table votingapi_vote in the defaut column but nothing...

What have I to change in voting api tables?

Thanks

drewish’s picture

Status: Active » Fixed

I think you want to implement hook_votingapi_views_formatters(). API.txt has details:

An example of a custom Views value formatter
============================================
function mymodule_votingapi_views_formatters($field) {
if ($field->field == 'value') {
return array('mymodule_funky_formatter' => t('MyModule value formatter'));
}
if ($field->field == 'tag') {
return array('mymodule_funky_tags' => t('MyModule tag formatter'));
}
}

junro’s picture

I'm not a developper or a php programer :)

So, I have to put a code to do that? A code like this?

I just want
IF NO VALUE --> DON't DISPLAY ANYTHING...

Wich code do I have to create for this? and where do I have to put it? In which file?

Thanks for the help^^

Status: Fixed » Closed (fixed)

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