Index: mailhandler.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mailhandler/Attic/mailhandler.module,v
retrieving revision 1.96.2.30
diff -u -r1.96.2.30 mailhandler.module
--- mailhandler.module	4 Aug 2010 18:10:25 -0000	1.96.2.30
+++ mailhandler.module	26 Jan 2011 23:13:43 -0000
@@ -118,57 +118,75 @@
 /**
  * Implementation of hook_help().
  */
-function mailhandler_help($path = 'admin/help#mailhandler', $arg) {
+function mailhandler_help($path, $arg) {
   $output = '';
 
-  // Gather examples of useful commands, and build a definition list with them:
-  $commands[] = array('command' => 'taxonomy: [term1, term2]',
-                      'description' => t('Use this to add the terms <em>term1</em> and <em>term2</em> to the node.<br />
-                      Both of the terms should already exist. In case they do not exist already, they will be quietly ommitted'));
-  $commands[] = array('command' => 'taxonomy[v]: [term1, term2]',
-                      'description' => t('Similar to the above: adds the terms <em>term1</em> and <em>term2</em> to the node, but uses the vocabulary with the vocabulary id <em>v</em>. For example <em>taxonomy[3]</em> will chose only terms from the vocabulary which id is 3.<br />
-                      In case some of the terms do not exist already, the behavior will depend on whether the vocabulary is a free tagging vocabulary or not. If it is a free tagging vocabulary, the term will be added, otherwise, it will be quietly ommitted'));
-
-  $commands_list = '<dl>';
-  foreach ($commands as $command) {
-    $commands_list .= '<dt>'. $command['command'] .'</dt>';
-    $commands_list .= '<dl>'. $command['description'] .'</dl>';
-  }
-  $commands_list .= '</dl>';
-
   switch ($path) {
     case 'admin/help#mailhandler':
-      $output = '<p>'. t('The mailhandler module allows registered users to create or edit nodes and comments via e-mail. Users may post taxonomy terms, teasers, and other post attributes using the mail commands capability.  This module is useful because e-mail is the preferred method of communication by community members.') .'</p>';
+      $output .= '<p>'. t('The mailhandler module allows registered users to create or edit nodes and comments via e-mail. Users may post taxonomy terms, teasers, and other post attributes using the mail commands capability.  This module is useful because e-mail is the preferred method of communication by community members.') .'</p>';
       $output .= '<p>'. t('The mailhandler module requires the use of a custom mailbox.  Administrators can add mailboxes that should be customized to meet the needs of a mailing list. This mailbox will then be checked on every cron job. Administrators may also initiate a manual retrieval of messages.') .'</p>';
       $output .= '<p>'. t('This is particularly useful when you want multiple sets of default commands. For example , if you want to authenticate based on a non-standard mail header like Sender: which is useful for accepting submissions from a listserv. Authentication is usually based on the From: e-mail address.  Administrators can edit the individual mailboxes when they administer mailhandler.') .'</p>';
       $output .= t('<p>You can</p>
-<ul>
-<li><a href="@run-cron">run cron</a> to retrieve messages from all cron enabled mailboxes.</li>
-<li>list mailboxes at <a href="@admin-mailhandler">Administer &gt;&gt; Content management &gt;&gt; Mailhandler</a>.</li>
-<li>add a mailbox at <a href="@admin-mailhandler-add">Administer &gt;&gt; Content management &gt;&gt; Mailhandler &gt;&gt; Add  mailbox.</a></li>
-<li>set default commands, (password, type, taxonomy, promote, status), for how to work with incoming mail at <a href="%admin-mailhandler">Administer &gt;&gt; Content management &gt;&gt; Mailhandler</a> and select <strong>edit</strong> for the email address being handled.  Set commands in the default command field.</li>
-<li>post email, such as from a mailing list, to a forum by adding the term id (number found in the URL) to the default commands using <strong>tid: #</strong>.</li>
-<li>alter mailhandler settings (default content type and cron threshold) at <a href="@admin-mailhandler-settings">Administer &gt;&gt; Site configuration &gt;&gt; Mailhandler</a>.</li>
-</ul>',
-   array(
-     '@run-cron' => url('admin/logs/status/run-cron'),
-     '@admin-mailhandler-add' => url('admin/content/mailhandler/add'),
-     '@admin-mailhandler' => url('admin/content/mailhandler'),
-     '@admin-mailhandler-settings' => url('admin/settings/mailhandler'),
-   ));
+        <ul>
+        <li><a href="@run-cron">run cron</a> to retrieve messages from all cron enabled mailboxes.</li>
+        <li>list mailboxes at <a href="@admin-mailhandler">Administer &gt;&gt; Content management &gt;&gt; Mailhandler</a>.</li>
+        <li>add a mailbox at <a href="@admin-mailhandler-add">Administer &gt;&gt; Content management &gt;&gt; Mailhandler &gt;&gt; Add  mailbox.</a></li>
+        <li>set default commands, (password, type, taxonomy, promote, status), for how to work with incoming mail at <a href="%admin-mailhandler">Administer &gt;&gt; Content management &gt;&gt; Mailhandler</a> and select <strong>edit</strong> for the email address being handled.  Set commands in the default command field.</li>
+        <li>post email, such as from a mailing list, to a forum by adding the term id (number found in the URL) to the default commands using <strong>tid: #</strong>.</li>
+        <li>alter mailhandler settings (default content type and cron threshold) at <a href="@admin-mailhandler-settings">Administer &gt;&gt; Site configuration &gt;&gt; Mailhandler</a>.</li>
+        </ul>',
+      array(
+        '@run-cron' => url('admin/logs/status/run-cron'),
+        '@admin-mailhandler-add' => url('admin/content/mailhandler/add'),
+        '@admin-mailhandler' => url('admin/content/mailhandler'),
+        '@admin-mailhandler-settings' => url('admin/settings/mailhandler'),
+      ));
       $output .= '<h3 id="commands">'. t('Useful Commands') .'</h3>';
+
+      // Gather examples of useful commands and build a definition list.
+      $commands = array(
+        array(
+          'command' => 'type: [content_type]',
+          'description' => t('Use this command to assign a content type to this submission.'),
+        ),
+        array(
+          'command' => 'promoted: 1',
+          'description' => t('Use this command to promote this submission to the front page.'),
+        ),
+        array(
+          'command' => 'Taxonomy: [term1, term2]',
+          'description' => t('Use this to add the terms <em>term1</em> and <em>term2</em> to the node.<br />Both of the terms should already exist. In case they do not exist already, they will be quietly ommitted'),
+        ),
+        array(
+          'command' => 'Taxonomy[v]: [term1, term2]',
+          'description' => t('Similar to the above: adds the terms <em>term1</em> and <em>term2</em> to the node, but uses the vocabulary with the vocabulary id <em>v</em>. For example <em>taxonomy[3]</em> will chose only terms from the vocabulary which id is 3.<br />In case some of the terms do not exist already, the behavior will depend on whether the vocabulary is a free tagging vocabulary or not. If it is a free tagging vocabulary, the term will be added, otherwise, it will be quietly ommitted'),
+        ),
+      );
+
+      $commands_list = '<dl>';
+      foreach ($commands as $command) {
+        $commands_list .= '<dt>'. $command['command'] .'</dt>';
+        $commands_list .= '<dl>'. $command['description'] .'</dl>';
+      }
+      $commands_list .= '</dl>';
       $output .= $commands_list;
+
       $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@mailhandler">Mailhandler page</a>.', array('@mailhandler' => url('http://www.drupal.org/handbook/modules/mailhandler', array('absolute' => TRUE)))) .'</p>'; 
-      return $output;
+      break;
     case 'admin/content/mailhandler':
-      return t('The mailhandler module allows registered users to create or edit nodes and comments via email. Authentication is usually based on the From: email address. There is also an email filter that can be used to prettify incoming email. Users may post taxonomy terms, teasers, and other node parameters using the Command capability.');
+      $output .= '<p>' . t('The mailhandler module allows registered users to create or edit nodes and comments via email. Authentication is usually based on the From: email address. There is also an email filter that can be used to prettify incoming email. Users may post taxonomy terms, teasers, and other node parameters using the Command capability.') . '<br />';
+      $output .= t('When configuring a mailbox, remember that !settings apply to all mailboxes listed below.', array('!settings' => l(t('Mailhandler global settings'), 'admin/settings/mailhandler'))) . '</p>';
+      break;
     case 'admin/content/mailhandler/add':
-      return t('Add a mailbox whose mail you wish to import into Drupal. Can be IMAP, POP3, or local folder.');
-    case 'admin/content/mailhandler/edit/%':
-      return t('Edit the mailbox whose mail you wish to import into Drupal. Can be IMAP, POP3, or local folder.');
+      $output = '<p>' .  t('Add a mailbox whose mail you wish to import into Drupal. Can be IMAP, POP3, or local folder.') . '</p>';
+      break;
     case 'admin/settings/mailhandler':
-      return t('The mailhandler module allows registered users to create or edit nodes and comments via e-mail.');
+      $output .= '<p>' . t('The mailhandler module allows registered users to create or edit nodes and comments via e-mail.') . '<br />';
+      $output .= t('This settings will affect to all the entries listed in the !mailboxes page.', array('!mailboxes' => l(t('Mailhandler mailboxes'), 'admin/content/mailhandler'))) . '</p>';
+      break;
   }
+
+  return $output;
 }
 
 

