You are here

function messaging_admin_help in Messaging 6.3

Same name and namespace in other branches
  1. 6 messaging.admin.inc \messaging_admin_help()
  2. 6.2 messaging.admin.inc \messaging_admin_help()

Aditional help for admin pages, will be called from messaging_help().

All paths here start with 'admin/messaging'

1 call to messaging_admin_help()
messaging_help in ./messaging.module
Implementation of hook_help().

File

./messaging.admin.inc, line 16
Messaging Framework - Admin UI

Code

function messaging_admin_help($path, $arg) {
  switch ($path) {
    case 'admin/messaging/template':
      $output = '<p>' . t('Configure the templates for different types of messages. Each message group is defined by other modules using the Messaging Framework. A typical message consists on the following parts:') . '</p>';
      $output .= '<small><table>';
      $output .= '<tr><td colspan="2"><em>' . t('Subject') . '</em></td><td>' . t('Single line with a short description') . '</td></tr>';
      $output .= '<tr><td rowspan="3">' . t('Body') . '</td><td><em>' . t('Header') . '</em></td><td>' . t('Greetings line') . '</td></tr>';
      $output .= '<tr><td><em>' . t('Content') . '</em></td><td>' . t('Message main content, usually longer with the full description') . '</td></tr>';
      $output .= '<tr><td><em>' . t('Footer') . '</em></td><td>' . t('Closing part with site information, unsubscribe links, etc...') . '</td></tr>';
      $output .= '</table></small>';
      $output .= '<p>' . t('Here you\'ll be able to configure each of these parts for each sending method. When one of these parts is left blank, there is a fallback system which goes as follows:') . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . t('If a message part is left blank for a sending method, the text part from Default sending method will be used.') . '</li>';
      $output .= '<li>' . t('If the Default part is blank too, the fallback template (the parent in this tree) will be used.') . '</li>';
      $output .= '</ul>';
      return $output;
    case 'admin/messaging/settings/method':
      $output = '<p>' . t('Depending on your content format and the tokens you are using for messages it is important that you use the right filtering for the message body. Set up the filters you need using the <a href="@input_formats">Input formats</a> page', array(
        '@input_formats' => url('admin/settings/filters'),
      )) . '</p>';
      return $output;
    default:

      // Edit template groups
      if ($arg[3] == 'edit' && ($group = $arg[4])) {
        $info = messaging_message_group($group);
        $output = '<p>' . t('These are the message parts for %group.', array(
          '%group' => messaging_message_group($group, 'name'),
        ));
        if (!empty($info['description'])) {
          $output .= ' ' . $info['description'];
        }
        $output .= '</p>';
        if (!empty($info['help'])) {
          $output .= '<p>' . $info['help'] . '</p>';
        }
        $output .= '<p>' . t('Leave blank to use the default texts or use \'%empty\' for an empty message part, preventing fallback to default message texts.', array(
          '%empty' => MESSAGING_EMPTY,
        ));
        if (!empty($info['fallback'])) {
          $output .= ' ' . t('The fallback template from which message parts will be taken if left blank is <a href="@template_edit">%template_name</a>', array(
            '@template_edit' => url('admin/messaging/template/edit/' . $info['fallback']),
            '%template_name' => messaging_message_group($info['fallback'], 'name'),
          ));
        }
        $output .= '</p>';
        return $output;
      }
  }
}