User Points integration

Losik - March 31, 2007 - 19:23
Project:Advanced Poll
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active (needs more info)
Description

Hi! What about User Points and Advanced Polls integration -- on 'add vote' level, but no 'create new voting'?

#1

fajerstarter - April 1, 2007 - 09:50

It would help if you did some research on what would be needed in advpoll to achieve this.

#2

ChrisKennedy - May 1, 2007 - 04:02
Status:active» active (needs more info)

I am also unclear as to what you are talking about - please elaborate.

#3

ebeyrent - November 14, 2007 - 14:18

It sounds like the original poster is looking to award points to users every time they vote on an existing poll.

We would need to add some code to make points for this event configurable on the Points Settings admin page.

We would need something like this:

<?php
$points
= variable_get( 'userpoints_poll_vote', 0);
switch(
$op) {
  case
'vote':
   
userpoints_userpointsapi('points', $points, $uid);
    break;
  case
'cancel vote':
   
userpoints_userpointsapi('points', (0-$points), $uid);
    break;
}
?>

What do you think?

#4

fajerstarter - November 14, 2007 - 15:45

Neither me or Chris have worked with Userpoints, so we appreciate any patches, input and insight in this.

#5

ebeyrent - November 14, 2007 - 16:29

I'll work up a solution for this and post here when it's done.

#6

mgrant - February 25, 2008 - 13:47

Maybe one could use the fivestar module in conjunction with this module to accomplish this?

 
 

Drupal is a registered trademark of Dries Buytaert.