2
  • There is a User Groups in our site (i used og)
  • Point system for posting nodes (for this i used userpoints,userpoints_contrib,userpoints_nc)

Since its working fine, Now i need to set target points to the groups, so that the users of that particular groups needs to get the target points. They need to get the alert message like

You have earned XX points, you need to get YY points to finish your target

How to do this? Is there any modules for this requirement? guide me...

1 Answer 1

3

You'll probably have to use the Rules module to make it happen.

Maybe create some kind of custom field (integer) to store the value of your target points value. ie. target points field = 100 points

Now, you can create a Rule to activate on the event "user awarded points", so that every time a user gets points, that rule is run.

Next, have that rule activate a different rule component, which is designed to compare the user's current points total with the value in the target points field. (So, every time somebody is awarded points, the system will check to see if they have met their target.)

You can set a condition such that, if the current point value is "less than" the target value, run an action "display a message" with some text saying you need XX more points till you finish your target.

(You may need an additional step to run a calculation on the points needed, but I think you get the idea of what you need to do with my example.)

3
  • 1
    Awesome! this is what i needed.
    – iLaYa ツ
    Feb 23, 2012 at 7:54
  • Hi, to set the condition we need current point and target point in rules, how can we get the target point and earned point into rules?
    – iLaYa ツ
    Feb 24, 2012 at 9:28
  • Well, for the Target Point, it can either be "hard coded" if it never changes, you would then just specify a number. Otherwise, if it changes, you need to embed the value into a field on some kind of Node or User, that is going to be referenced during the process of evaluating their work. For the earned point value, you need to be able to reference a a user during the Rules evaluation. Then you can drill down through rules "data selection" on the user entity and current total user points should be an option. Feb 24, 2012 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.