You are here

function antispam_help in AntiSpam 6

Same name and namespace in other branches
  1. 7 antispam.module \antispam_help()

Implementation of hook_help().

File

./antispam.module, line 43

Code

function antispam_help($path, $arg) {
  switch ($path) {
    case 'admin/help#antispam':
      $output = t('<p>In order to use the AntiSpam, you need a API key for the selected antispam service. If you don\'t have one already, you can get it by simply signing up for a free account at the following sites.</p>
<ul>
<li><a href="!wordpress">wordpress.com</a> for <a href="!akismet">Akismet</a> service
<li><a href="!typepad">typepad.com</a> for TypePad AntiSpam service
<li><a href="!defensio">defensio.com</a> for Defensio service
</ul>
<p>The <em>antispam module</em> may automatically check for spam posted in content (nodes and/or comments) by any user, except node or comment administrators respectively. It is also possible, from the <a href="!permission">Permission</a> panel, to grant <em>%no-check-perm</em> permission to <em>user roles</em> of your choice.</p>
<p>Content marked as <em>spam</em> is still saved into database so it can be reviewed by content administrators. There is <a href="!antispam-settings">an option</a> that allows you to specify how long this information will be kept in the database. <em>Spam</em> older than a specified age will be automatically removed. Requires crontab.</p>
<p>Automatic spam detection can be enabled or disabled by content type and/or comments. In addition to this, the antispam service makes it easy for <em>content administrators</em> to manually <em>publish</em>/<em>unpublish</em> content and <em>mark</em>/<em>unmark</em> content as spam, from links available at the bottom of content.</p>
<p></p>', array(
        '!wordpress' => url('http://wordpress.com'),
        '!akismet' => url('http://akismet.com'),
        '!typepad' => url('http://antispam.typepad.com'),
        '!defensio' => url('http://defensio.com'),
        '!antispam-settings' => url('admin/settings/antispam'),
        '!permission' => url('admin/user/permissions'),
        '%no-check-perm' => t('post with no antispam checking'),
      ));
      return $output;
    case 'admin/help/antispam':
    case 'admin/settings/antispam':
      $output = t('<p>The <a href="!antispam-module-home">AntiSpam module</a> for <a href="!drupal">Drupal</a> allows you to use either one of the <a href="!akismet">Akismet</a>, <a href="!typepad">TypePad AntiSpam</a> or <a href="!defensio">Defensio</a> service to protect your site from being spammed.</p>', array(
        '!antispam-module-home' => url(ANTISPAM_MODULE_HOMEURL),
        '!drupal' => url('http://drupal.org'),
        '!akismet' => url('http://akismet.com'),
        '!typepad' => url('http://antispam.typepad.com'),
        '!defensio' => url('http://defensio.com'),
      ));
      $output .= t('<p>AntiSpam has caught <strong>@count spam</strong> for you since %since.</p>', array(
        '@count' => antispam_get_total_counter(ANTISPAM_COUNT_SPAM_DETECTED),
        '%since' => antispam_get_counting_since(),
      ));
      return $output;
    case 'admin/content/antispam/nodes/unpublished':
      $output = t('Below is the list of <strong>unpublished nodes</strong> awaiting for moderation.');
      $output .= ' ' . t('Click on the titles to see the content of the nodes or the author\'s name to view the author\'s user information. You may also wish to click on the headers to order the nodes upon your needs.');
      break;
    case 'admin/content/antispam/nodes/published':
      $output = t('Below is the list of <strong>published nodes</strong>.');
      $output .= ' ' . t('Click on the titles to see the content of the nodes or the author\'s name to view the author\'s user information. You may also wish to click on the headers to order the nodes upon your needs.');
      break;
    case 'admin/content/antispam/nodes':

      // spam
      $output = t('Below is the list of <strong>nodes marked as spam</strong> awaiting for moderation.');
      $output .= ' ' . t('Click on the titles to see the content of the nodes or the author\'s name to view the author\'s user information. You may also wish to click on the headers to order the nodes upon your needs.');
      break;
    case 'admin/content/antispam/comments/unpublished':
      $output = t('Below is the list of <strong>unpublished comments</strong> awaiting for moderation.');
      $output .= ' ' . t('Click on the subjects to see the comments or the author\'s name to view the author\'s user information. You may also wish to click on the headers to order the comments upon your needs.');
      break;
    case 'admin/content/antispam/comments/published':
      $output = t('Below is the list of <strong>published comments</strong>.');
      $output .= ' ' . t('Click on the subjects to see the comments or the author\'s name to view the author\'s user information. You may also wish to click on the headers to order the comments upon your needs.');
      break;
    case 'admin/content/antispam/comments':

      // spam
      $output = t('Below is the list of <strong>comments marked as spam</strong> awaiting for moderation.');
      $output .= ' ' . t('Click on the subjects to see the comments or the author\'s name to view the author\'s user information. You may also wish to click on the headers to order the comments upon your needs.');
      break;
  }
  if (arg(0) == 'admin' && arg(1) == 'content ' && arg(2) == 'antispam' && !isset($_POST) && !empty($output)) {
    $output .= '<br />' . t('<strong>Note:</strong> To interact fully with the antispam service, you really should try putting data back into the system as well as just taking it out. If it is at all possible, please use the submit <em>ham</em> operation rather than simply publishing content that was identified as spam (false positives). This is necessary in order to let the antispam service learn from its mistakes. Thank you.');
  }
}