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

Berdir’s picture

Project: User Points » User points Nodes and Comments
Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Component: Code: userpoints » Code
Issue tags: -poll, -vote

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

GaxZE’s picture

this functionality would be great.

I looked at getting this to work with rules & voting rules but to no avail.