Disable Drupal 7 fivestar widget after vote is done

525 Views Asked by At

Co's,

I am a newbie to drupal. I am using Drupal 7,fivestar,userpoints and voting rules modules in my intranet site. I created new rules by using the Rules module to award points to the content author based on the rating ( no of stars etc) provided by the logged in users. This is working fine.

But the problem is , whenever the logged in user clicked the fivestar widget, an event fires and the content author getting points based on the rules defined. To resolve this, I want to disable the fivestar widget after the logged in user clicked the fivestar widget once. How can we make it ? Could you please suggest how to achieve this ?

Version details for the modules i am using are below.

Fivestar 7.x-2.0-alpha2

Voting API 7.x-2.6

Userpoints 7.x-1.0

Voting Rules 7.x-1.0-alpha1

Rules 7.x-2.1

1

There are 1 best solutions below

0
Beto Aveiga On

You must add a condition to the rule, something like "if user hasn't vote on the content yet". Probably you can achieve this just using the rules interface, otherwise you will have to do a little research on the fivestar api to verify users vote on a specific node. Hope that helps!