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 term1 and term2 to the node.
- 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 term1 and term2 to the node, but uses the vocabulary with the vocabulary id v. For example taxonomy[3] will chose only terms from the vocabulary which id is 3.
- 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 = '
'; - foreach ($commands as $command) { - $commands_list .= '
'. $command['command'] .'
'; - $commands_list .= '
'. $command['description'] .'
'; - } - $commands_list .= '
'; - switch ($path) { case 'admin/help#mailhandler': - $output = '

'. 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.') .'

'; + $output .= '

'. 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.') .'

'; $output .= '

'. 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.') .'

'; $output .= '

'. 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.') .'

'; $output .= t('

You can

-', - 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'), - )); + ', + 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 .= '

'. t('Useful Commands') .'

'; + + // 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 term1 and term2 to the node.
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 term1 and term2 to the node, but uses the vocabulary with the vocabulary id v. For example taxonomy[3] will chose only terms from the vocabulary which id is 3.
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 = '
'; + foreach ($commands as $command) { + $commands_list .= '
'. $command['command'] .'
'; + $commands_list .= '
'. $command['description'] .'
'; + } + $commands_list .= '
'; $output .= $commands_list; + $output .= '

'. t('For more information please read the configuration and customization handbook Mailhandler page.', array('@mailhandler' => url('http://www.drupal.org/handbook/modules/mailhandler', array('absolute' => TRUE)))) .'

'; - 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 .= '

' . 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 .= t('When configuring a mailbox, remember that !settings apply to all mailboxes listed below.', array('!settings' => l(t('Mailhandler global settings'), 'admin/settings/mailhandler'))) . '

'; + 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 = '

' . t('Add a mailbox whose mail you wish to import into Drupal. Can be IMAP, POP3, or local folder.') . '

'; + break; case 'admin/settings/mailhandler': - return t('The mailhandler module allows registered users to create or edit nodes and comments via e-mail.'); + $output .= '

' . t('The mailhandler module allows registered users to create or edit nodes and comments via e-mail.') . '
'; + $output .= t('This settings will affect to all the entries listed in the !mailboxes page.', array('!mailboxes' => l(t('Mailhandler mailboxes'), 'admin/content/mailhandler'))) . '

'; + break; } + + return $output; }