Posted by eaton on April 26, 2006 at 8:00pm
I'm the maintainer of an existing voting module
19% (8 votes)
I'd like to build a voting module and want to learn more about the APIs
24% (10 votes)
I'm setting up a site and need user-driven voting tools
57% (24 votes)
Total votes: 42

Comments
using the voting api within blocks
howdy. i'm currently working on allowing a person to vote from within a block that is constructed using some node content. fivestar just doesn't want to work very well in this setup (the block is displayed on the blog page), so i've constructed a simple script to display the vote average in a five star style, and to also insert votes depending on which start is clicked.
however, the voting cache does not seem to be updating when i use votingapi_add_vote. the vote IS stored in the votingapi_vote database properly, it's just that the cache isn't updated.
i've checked the documentation for votingapi written in the drupal books section, but there aren't very many details for the way the api functions work, or what is really necessary to get them to work.
if i can get the votingapi_cache to update it would make things super easy, but i guess i can always just do it myself. it'd probably be faster that way, i think i've wasted way too much time trying to get votingapi to work.
Did you generate the cache values
Did you actually generate the cache values? You'll need to calculate them yourself in your votingapi_recalculate hook - it doesn't do it for you.