Brought to you by molecularsciences.org.
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.
This publication may not be redistributed without this notice.

Using drupal6 actions

In drupal 6, actions and triggers have been added to the core. But what are actions used for? Lets say, you wish to receive an email every time someone leaves a comment. This can be accomplished with actions in less than 60 seconds. Here's how:

  1. Go to Administer > Site configuration > Actions
  2. Scroll down to "Make a new advanced action available" and choose "Send email..."
  3. Type your email, a subject, a message and hit save
  4. Click on the create button
  5. Go to Administer > Site Building > Modules
  6. Enable Trigger module
  7. Go to Administer > Site Building > Trigger
  8. Click on the Comments Tab
  9. In the "Trigger: After saving a new comment" section choose the "Send email..." action we just created
  10. Click on the Assign button

That's all. Make sure that you have given the necessary permissions for posting comments to your users and test it by adding a comment.