Hi,

I porpose to extend the rules action to add some userpoints to an account by some more attributes:
1. 'operation'
2. 'entity_type'
3. 'tid'

This enables to assign the points to a specific category or add some explaining operation to transaction.

As a proposal I added the necessary function revisions.

Comments

1sp’s picture

StatusFileSize
new2.44 KB

Hi ,

I needed an extended "Grant points to the user" action, So I patched the userpoints_rules.rules.inc . I am attaching the patch to be reviewed by community. Using this patch you can control almost every attribute of userpoints transaction from the action form. Following new attributes are now supported:

  • Userpoints category support (A long standing request)
  • entity type support
  • entity id support (with php evaluation support)

The patch was created against latest dev version (22nd feb, 2010)

Cheers,
Sudhir

YK85’s picture

Subscribing, awesome work!
Can we replace the current userpoints_rules.rules.inc file with this one?
Just wondering as the above isn't a patch file against the current that exists.
Thanks!

thekayra’s picture

Awesome. Subscribing. Will give it a try in the day.

1sp’s picture

this patch is against today's dev release

kbahey’s picture

Status: Needs review » Fixed

Thank you so much for this patch.

I committed it.

It will be part of the tarball in about 12 hours.

YK85’s picture

Thanks for the great work!

BenK’s picture

Awesome! Looking forward to trying this out....

Anonymous’s picture

Holy crap I was just about to sit down and figure this one out and you did the work for me! Sweet!

1sp’s picture

Thanks!! You all motivated me.

Cheers,
Sudhir

gaurav_m’s picture

good job!

Status: Fixed » Closed (fixed)

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

__mark’s picture

Category: feature » bug
Priority: Normal » Major

Did anyone notice that the Entity ID field does not understand $node->nid objects (or, as the field description puts it: $node->id)? It is accepting integers, so it's not completely broken.

Does anyone have an idea on where to start on getting this patch to work? Would it be where the form is created: userpoints_action_grant_points_form()?

__mark’s picture

Priority: Major » Normal

however, tokens work. problem solved.