Last updated October 2, 2011. Created by mfredrickson on February 9, 2006.
Edited by JuliaKM, bekasu, bryan kennedy, sepeck. Log in to edit this page.
This information is out-of-date. See http://drupal.org/node/172152 instead.
The Actions.module is a powerful way to automate tasks on your website. Actions are small "snippets" of php code that can be triggered on certain events. For an example of a module that uses actions, see workflow.module.
To use these actions, create a custom module in modules directory and paste the actions snippet into your module.
Example
<?php
//This is my module
function action_do_something($op, $edit = array(), $node) {
/* ACTION SNIPPET CODE GOES HERE */
}
?>Caution: Drupal 5.x: invoke actions_synchronize too
To get your custom action into the actions_registry table in Drupal 5, you also need to call actions_synchronize() in your module's implementation of hook_install (or hook_update()) for example: http://drupal.org/node/212378