Posted by -Shaman- on March 21, 2009 at 9:39pm
Jump to:
| Project: | Voting API |
| Version: | 6.x-2.0-rc2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I need update this small module http://drupal.org/project/comment_modr8 and I have troubles: votingapi_get_voting_result() I changed this into: votingapi_select_results, but then I got unsupported operands error.
Seems that there been lot's of changes in votingapi since 5 and it's hard for me to make this working, since I'm not into votingapi (or developing modules :P)
Attaching module, in case someone would be so nice and tried to help me with this.
| Attachment | Size |
|---|---|
| comment_modr8.txt | 1.61 KB |
Comments
#1
That's what I'm getting:
Fatal error: Call to undefined function votingapi_get_voting_result()#2
This should be placed as a forum post in module development. Or as an issue in the module in question as it doesn't have anything to do with the voting api.module
#3
I would say it has, because it's written specifically basing on votingapi.module api so only someone who is into this module could help.
#4
When an issue is placed in the issue queue of the module in question those subscribed to that issue queue are notifed of that activity. Thus the subcommunity of users who are actually using that module may be able to provide some help and port work can begin in the proper issue queue.
If you want to remark the status of this issue and press for someone in the voting_api community to do this for you, feel free.
#5
Well comment_modr8 maintainer seems to be out of touch, there is an issue about updating this module, but no activity from the author of the module, that's why I thought that this will be a good place to post about update, since this module is tight with votingapi.module, perhaps it could even be implemented into votingapi.module?
#6
I wouldn't think so as this module is only an api. Modules are built to interact with this api. ie: fivestar, nodevote so on so forth.
#7
#8
I had the same issue. This is the correct setup:
$current_rating = votingapi_select_results(array('content_id' => $node->nid, 'value_type' =>'percent', 'tag' =>'Satisfaction', 'function' => 'average'));
#9
Thanks for that one!
Using the code from comment#8, you will find the value in $current_rating[0]['value']
#10
I also just bumped into this on a site I'm converting from D5 to D5. I'm surprised that someone didn't take care of backward compatibility of votingapi_get_voting_result().