I'm working the implementation of a user notification system. The result should be that after setting a flag indicating a desired notification (e.g., an email or SMS is sent when a star is given, a forum is updated, etc), that notification is initiated.
To accomplish that, I'm proposing a field set in the user profile.
The event causes a trigger that Rules detects.
An action occurs contingent on the flag in the profile (and perhaps other contingencies).
Problem:
Getting the Event to be seen as a selectable trigger for Rules. That one was at least partially overcome with "Voting_Rules", in one of the Notification scenarios.
The roadblock now, is that I can not seem to get much PHP to work. The second is a reference for what variables are available to Rules. No documentation seems to exist.
Starting with the simplest scenario, I coded the following very rudimentary code into the action window.
<?php
print('this is php </br>');
print ('the vote ' . $vote);
print('</br>');
print('user var '. $user);
print('</br>');
print('vote var ' . $vote);
?>
The variables seemed empty. And that in spite of the fact that $vote was clearly indicated as being "available".
So, the question is, what variables ARE available, where are they documented, are hooks available to be evaluated in the Actions window, and where can one find documentation on the module beyond the very superficial "here it is, and here is how to use it as is..."
(see attached screen shot)
Thanks so much, in advance!
Attachment | Size |
---|---|
Screen shot 2011-05-13 at 11.52.30 AM.png | 48.66 KB |