Voting API Integration
BlakeLucchesi - July 1, 2008 - 01:41
| Project: | Voting API |
| Version: | 6.x-2.0-beta6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs work) |
Description
Please support voting api to alter content ranking.

#1
I started working on integration with votingapi, based on the table structure for votingapi there needs to be modification to the way hook_ranking works to allow WHERE clauses or data needs to be stored in another way so that total votes and averages can be joined on to the node table directly without WHERE clauses.
Will follow up more on this later, but for now its late.
#2
Attached is an initial version of a patch to add a scoring factor for average vote score. Tests need to be written to verify.
#3
Re-rolled, sorry that first one wasn't even close to working.
#4
Patch rerolled for the votingapi module instead of fivestar. The patch adds hook_ranking for the votingapi module so that nodes can be ranked based on average voting score during search. The query joins votes that are tagged as 'vote'. (this is the default tag for vote data stored in votingapi, and is how fivestar module stores votes in votingapi.)
#5
moved to votingapi module issue queue.
#6
I definitely like the idea, unfortunately this will break when voting modules like VoteUpDown or Plus1 are used -- they work with total counts rather than averages...