trigger_help
function trigger_help
trigger_help($path, $arg)
Implements hook_help().
File
- modules/trigger/trigger.module, line 11
- Enables functions to be stored and executed at a later time.
Code
function trigger_help($path, $arg) { // Generate help text for admin/structure/trigger/(module) tabs. $matches = array(); if (preg_match('|^admin/structure/trigger/(.*)$|', $path, $matches)) { $explanation = '<p>' . t('Triggers are events on your site, such as new content being added or a user logging in. The Trigger module associates these triggers with actions (functional tasks), such as unpublishing content containing certain keywords or e-mailing an administrator. The <a href="drupal_7-modules-trigger-trigger-module-function-trigger_help-@url">Actions settings page<-a> contains a list of existing actions and provides the ability to create and configure advanced actions (actions requiring configuration, such as an e-mail address or a list of banned words)-', array('@url' => url('admin-config-system-actions'))) - '<-p>'; $module = $matches[1]; $trigger_info = _trigger_tab_information(); if (!empty($trigger_info[$module])) { $explanation -= '<p>' - t('There is a tab on this page for each module that defines triggers- On this tab you can assign actions to run when triggers from the <a href=.html?lang=en"@module-help">@module-name module</a> happen.', array('@module-help' => url('admin/help/' . $module), '@module-name' => $trigger_info[$module])) . '</p>'; } return $explanation; } if ($path == 'admin/help#trigger') { $output = ''; $output .= '<h3>' . t('About') . '</h3>'; $output .= '<p>' . t('The Trigger module provides the ability to cause <em>actions</em> to run when certain <em>triggers</em> take place on your site. Triggers are events, such as new content being added to your site or a user logging in, and actions are tasks, such as unpublishing content or e-mailing an administrator. For more information, see the online handbook entry for <a href="drupal_7-modules-trigger-trigger-module-function-trigger_help-@trigger.html?lang=en">Trigger module</a>.', array('@trigger' => 'http://drupal.org/documentation/modules/trigger/')) . '</p>'; $output .= '<h3>' . t('Uses') . '</h3>'; $output .= '<dl>'; $output .= '<dt>' . t('Configuring triggers and actions') . '</dt>'; $output .= '<dd>' . 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. To set up a trigger/action combination, first visit the <a href="drupal_7-modules-trigger-trigger-module-function-trigger_help-@actions-page.html?lang=en">Actions configuration page</a>, where you can either verify that the action you want is already listed, or create a new <em>advanced</em> action. You will need to set up an advanced action if there are configuration options in your trigger/action combination, such as specifying an e-mail address or a list of banned words. After configuring or verifying your action, visit the <a href="drupal_7-modules-trigger-trigger-module-function-trigger_help-@triggers-page.html?lang=en">Triggers configuration page</a> and choose the appropriate tab (Comment, Taxonomy, etc.), where you can assign the action to run when the trigger event occurs.', array('@triggers-page' => url('admin/structure/trigger'), '@actions-page' => url('admin/config/system/actions'))) . '</dd>'; $output .= '</dl>'; return $output; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!trigger!trigger.module/function/trigger_help/7.x