function trigger_help in Drupal 6
Same name and namespace in other branches
- 7 modules/trigger/trigger.module \trigger_help()
Implementation of hook_help().
File
- modules/
trigger/ trigger.module, line 12 - Enables functions to be stored and executed at a later time when triggered by other modules or by one of Drupal's core API hooks.
Code
function trigger_help($path, $arg) {
$explanation = '<p>' . t('Triggers are system events, such as when new content is added or when a user logs in. Trigger module combines these triggers with actions (functional tasks), such as unpublishing content or e-mailing an administrator. The <a href="@url">Actions settings page</a> contains a list of existing actions and provides the ability to create and configure additional actions.', array(
'@url' => url('admin/settings/actions'),
)) . '</p>';
switch ($path) {
case 'admin/build/trigger/comment':
return $explanation . '<p>' . t('Below you can assign actions to run when certain comment-related triggers happen. For example, you could promote a post to the front page when a comment is added.') . '</p>';
case 'admin/build/trigger/node':
return $explanation . '<p>' . t('Below you can assign actions to run when certain content-related triggers happen. For example, you could send an e-mail to an administrator when a post is created or updated.') . '</p>';
case 'admin/build/trigger/cron':
return $explanation . '<p>' . t('Below you can assign actions to run during each pass of a <a href="@cron">cron maintenance task</a>.', array(
'@cron' => url('admin/reports/status'),
)) . '</p>';
case 'admin/build/trigger/taxonomy':
return $explanation . '<p>' . t('Below you can assign actions to run when certain taxonomy-related triggers happen. For example, you could send an e-mail to an administrator when a term is deleted.') . '</p>';
case 'admin/build/trigger/user':
return $explanation . '<p>' . t("Below you can assign actions to run when certain user-related triggers happen. For example, you could send an e-mail to an administrator when a user account is deleted.") . '</p>';
case 'admin/help#trigger':
$output = '<p>' . t('The Trigger module provides the ability to trigger <a href="@actions">actions</a> upon system events, such as when new content is added or when a user logs in.', array(
'@actions' => url('admin/settings/actions'),
)) . '</p>';
$output .= '<p>' . t('The combination of actions and triggers can perform many useful tasks, such as e-mailing an administrator if a user account is deleted, or automatically unpublishing comments that contain certain words. By default, there are five "contexts" of events (Comments, Content, Cron, Taxonomy, and Users), but more may be added by additional modules.') . '</p>';
$output .= '<p>' . t('For more information, see the online handbook entry for <a href="@trigger">Trigger module</a>.', array(
'@trigger' => 'http://drupal.org/handbook/modules/trigger/',
)) . '</p>';
return $output;
}
}