I've been testing the Rules module in conjunction with some contributed modules that support Rules like Userpoints (http://drupal.org/project/userpoints) and Janrain Engage (http://drupal.org/project/rpx). When I create an action (such as 'Send a mail') on a module-specific event (such as 'User was awarded points' for the Userpoints module), I'm not seeing any available replacement patterns except ones for 'Site information'.
I do see, however, the $userpoints_transaction variable available under 'PHP evaluation' (and I can successfully use it with PHP).
And I do seem to remember Userpoints replacement patterns being available previously on the action.
So is it possible that some recent Rules/Entity change made replacement tokens not available for objects declared with hook_rules_data_info() ?
Thanks,
Ben
Comments
Comment #1
fago>And I do seem to remember Userpoints replacement patterns being available previously on the action.
hm, I doubt that, because I've not implemented that feature yet ;) Shouldn't be hard though, as we could basically do the same as entity_tokens does for entities. Maybe another module provided the tokens though.
Comment #2
BenK commentedHey fago,
Thanks for the clarification. Yes, this would be a very helpful feature for a lot of the contributed modules I work on that have Rules integration. We're always wanting to include module-related tokens in the triggered Rules action (especially actions that involve displaying or sending messages).
Once there is a patch in the works, let me know and I am happy to manually test and report back.
Cheers,
Ben
Comment #3
berdirSubscribe and cross-reference #958288: Add replacement patterns within Rules for Userpoints transactions. According to that issue over there, it did never work.
As an alternative, will rules.module pick up existing "normal" tokens if the type matches?
Comment #4
fagoyep, of course. Rules just runs usual token replacements.
Comment #5
berdirOk, working on that.
Short question, sorry for hijacking the issue, failed to catch you in IRC :)
Is there a reason you're not using the fancy token-browser widget from token.module when it's available other than "Nobody implemented it"?
It looks like your table doesn't pick up recursive tokens nor can you insert them into the textfield/area by simply clicking on them. Especially the first is a bummer, because it really limits the usability of the whole thing.
I can write a patch if you're interested...
Comment #6
fago>Is there a reason you're not using the fancy token-browser widget from token.module when it's available other than "Nobody implemented it"?
No. ;)
>I can write a patch if you're interested...
That would be great! Let's just make use of it if the token module is available.
Comment #7
berdirOk, opened a new issue for that at #1062190: Use token_tree browser from token.module when available..
Comment #8
fagohttp://drupal.org/node/812058