Hello. Does anyone know how could I add Php code to a Rule to determine the number of Points to add on a category depending on a CCK field of the node which triggers the Rule?

Example: There is a "Riddle" node with a CCK Field called Prize. The user solves the riddle and enters the solution on a Field, that triggers a Rule which add a number of points on the "Money" category according to the Prize and some mathematical conditions.

I've playing with user_rules, but I'm not sure how to implement this. Thanks!

Comments

jredding’s picture

You can also use the custom PHP code on any rule and then call the userpoints api directly. See the documentation on how to use the API.

daniorama’s picture

Status: Active » Needs work

Does could work really nice... I was creating a kind of submodule with more rules for userpoints, but I think this could be better. Thanks!

mitchell’s picture

Status: Needs work » Active

subscribing. I'm interested to see how this works out.

Bilmar’s picture

Status: Active » Fixed

@DaniOrama - were you able to resolve your goal? If so, could you please share with the community?
This seems 'fixed' for the original requester.
Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.