Active
Project:
User points Nodes and Comments
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2011 at 00:09 UTC
Updated:
20 Aug 2012 at 10:39 UTC
Hello,
Is there any way that I can have the User Points module give points to my visitors for voting in polls?
What I would like to happen is: User Votes on Poll >> Earns ## Points. User Cancels Vote >> Loses ## Points.
I've noticed this request for previous versions, but am wondering if it will be implemented in upcoming versions or if there is some code that I can add for this functionality.
Thanks!
Comments
Comment #1
berdirThere is no hook or anything in http://api.drupal.org/api/drupal/modules--poll--poll.module/function/pol..., which means that it can't be done easily.
The only way I can imagine this might be done is to hook_form_alter() the following form: http://api.drupal.org/api/drupal/modules--poll--poll.module/function/pol..., add a second submit callback to the vote button and then add/subtract points.
Moving to userpoints_nc, as this project just provides the UI and API to deal with points, other modules are responsible for adding points and everything node/comment related belongs to userpoints_nc.
Comment #2
gaxze commentedthis functionality would be great.
I looked at getting this to work with rules & voting rules but to no avail.