I believe that the actions and triggers in Drupal 6 are a very welcome enrichment, and the idea has a huge potential. Hence this request for generalization.
1. Allow combined triggers and combined actions.
There is already one combined trigger, but only because the second part of the trigger has been put into an actionthe posting or updating of a node or comment AND the presence of a string in it lead to the action.
However, when you not only want the posting to be unpublished, but also send an email to the admins, then you're out of luck with the current design.
A simple first step would be to make the presence of a string a trigger and to allow an AND combination of several triggers. Example:
IF a comment is changed AND it contains the string "http://" or "www." THEN unpublish it, THEN show a mesage to the user, THEN send email to admins.
2. Give us more triggers.
I'd like triggers and actions like:
3. String matching should not be case-sensitive.
In almost all practical cases, case-sensitive string matching is unwanted. I wouldn't even bother to add a checkbox for case sensitivity.
Moreover, string matching should be intelligent. Let a space in the search string match any whitespace, including line breaks.
Conclusion
With some enhancements like these, triggers could be grown into an extremely powerful tool for Drupal operators that nobody would like to miss.
Comments
Comment #1
miro_dietikerWhile introspecting the code i've realized the context normalization is a problem too.
Current normalization addresses trivial rules. The problem is there many times always multiple relations between types. E.g. normalization from a node to a user could be "author", "updater" (of the most recent revision) or "originator" or even a referred user from a cck field(?)... There are many such situations. And remember e.g. Views still don't support nested AND/ OR conditions or don't support OR at all...
Generalizing of the other things to me means also to provide object relationship implementation. In a way this all reminds me the cck field definition and views field definition.. But if we have the full field approach and all relationship information, we could do anything with triggers.
BTW: Did you already consult the module workflow?
Comment #2
fagoI think what you really want to do are conditions. Check out the rules modules if you don't know it.
Comment #3
sun.core commentedProper status.
Comment #4
sun.core commentedComment #5
xjmBased on #764558: Remove Trigger module from core, this issue will not be fixed since Trigger has been removed from D8. I'd suggest the Rules module, since the D8 contrib version of trigger is likely to be maintenance only.