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

BlakeLucchesi - July 6, 2008 - 09:55

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

BlakeLucchesi - July 11, 2008 - 01:47
Status:active» patch (code needs review)

Attached is an initial version of a patch to add a scoring factor for average vote score. Tests need to be written to verify.

AttachmentSize
fivestar_average_score.patch1.14 KB

#3

BlakeLucchesi - July 11, 2008 - 04:08

Re-rolled, sorry that first one wasn't even close to working.

AttachmentSize
fivestar_average_score.patch1.02 KB

#4

BlakeLucchesi - August 7, 2008 - 04:33

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.)

AttachmentSize
search_ranking.patch2.55 KB

#5

BlakeLucchesi - August 7, 2008 - 04:46
Project:Search Ranking» Voting API
Version:6.x-0.x-dev» 6.x-2.0-beta6

moved to votingapi module issue queue.

#6

Eaton - October 9, 2008 - 20:26
Status:patch (code needs review)» patch (code needs work)

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...

 
 

Drupal is a registered trademark of Dries Buytaert.