function mailhandler_help in Mailhandler 5
Same name and namespace in other branches
- 6.2 mailhandler.module \mailhandler_help()
- 6 mailhandler.module \mailhandler_help()
- 7.2 mailhandler.module \mailhandler_help()
- 7 mailhandler.module \mailhandler_help()
Implementation of hook_help().
File
- ./
mailhandler.module, line 851
Code
function mailhandler_help($section = 'admin/help#mailhandler') {
$output = '';
$link->add = l(t('Add mailbox'), 'admin/content/mailhandler/add');
// 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 ($section) {
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 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>run the cron job at cron.php.</li>
<li>add a mailbox at <a href="@admin-mailhandler-add">administer >> mailhandler >> add a mailbox.</a></li>
<li>administer mailhandler at <a href="@admin-mailhandler">administer >> mailhandler</a>.</li>
<li>set default commands, (password, type, taxonomy, promote, status), for how to work with incoming mail at <a href="%admin-mailhandler">admin >> mailhandler</a> 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>.', array(
'@admin-mailhandler-add' => url('admin/content/mailhandler/add'),
'@admin-mailhandler' => url('admin/content/mailhandler'),
)) . '</ul>';
$output .= '<h3 id="commands">' . t('Useful Commands') . '</h3>';
$output .= $commands_list;
$output .= '<p>' . t('For more information please read the configuration and customization handbook <a href="%mailhandler">Mailhandler page</a>.', array(
'%mailhandler' => 'http://www.drupal.org/handbook/modules/mailhandler/',
)) . '</p>';
return $output;
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.');
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.');
}
}