You are here

public function Botcha::help in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.3 controller/application/botcha.application.controller.inc \Botcha::help()

Implements hook_help().

Overrides IBotcha::help

File

controller/application/botcha.application.controller.inc, line 124
Contains Botcha class.

Class

Botcha
Just a middleman for achieving purposes such as:

Code

public function help($path, $arg) {
  switch ($path) {
    case 'admin/help#botcha':
      $output = '<p>' . t('"BOTCHA" is an acronym for "BOT Computerized Heuristic Analysis". It is a method of protection from automated form submissions by performing analysis of submitted data that determines whether the user is a bot. The BOTCHA module is a tool to fight automated submission by malicious users that utilize automated form submission (e.g. for spamming) of for example comments forms, user registration forms, guestbook forms, etc. BOTCHA inserts elements into the desired forms that will not be shown to normal users. These elements have no impact on humans and require no puzzles to solve, but they are easy enough for automated scripts and spam bots to trip on.') . '</p>';
      return $output;
    case Botcha::ADMIN_PATH:
      $output = t('A BOTCHA protection consists of these parts:
  <ul>
  <li><b>Forms</b>: By default BOTCHA protection is enabled for concrete list of forms. Those forms that are not in the list are not protected. You could manage the list of protected forms on <a href="@forms_page">Forms</a> page.</li>
  <li><b>Recipe books</b>: Recipe books are containers for recipes. You could use them to organize your defense lines against spam. To control your recipe books go to <a href="@recipebooks_page">Recipe books</a> page.</li>
  <li><b>Recipes</b>: Each recipe has its own method to differ a human visitor and a spam bot. Some of them are flexible enough to provide UI for controlling its behavior. See the list of available recipes on <a href="@recipes_page">Recipes</a> page.</li>
  </ul>', array(
        '@forms_page' => url(Botcha::ADMIN_PATH . '/form'),
        '@recipebooks_page' => url(Botcha::ADMIN_PATH . '/recipebook'),
        '@recipes_page' => url(Botcha::ADMIN_PATH . '/recipe'),
      ));
      return $output;
    case Botcha::ADMIN_PATH . '/form':
      $output = '<p>' . t('A BOTCHA protection can be added to virtually each Drupal form. Some default forms are already provided in the form list and more can be added using form internal name.') . '</p>';
      $output .= '<p>' . t('All existing forms can be easily added and managed when the option "%adminlinks" is enabled.', array(
        '%adminlinks' => t('Add BOTCHA administration links to forms'),
      )) . '</p>';
      if (module_exists('captcha')) {
        $output .= '<p>' . t('Other forms will be added automatically based on CAPTCHA settings when the option "%usecaptcha" is enabled.', array(
          '%usecaptcha' => t('Add BOTCHA to forms selected for CAPTCHA'),
        )) . '</p>';
      }
      $output .= '<p>' . t('Forms served to users with the "%skipbotcha" <a href="@perm">permission</a> won\'t be protected. Be sure to grant this permission to the trusted users (e.g. site administrators). If you want to test a protected form, be sure to do it as a user without the "%skipbotcha" permission (e.g. as anonymous user).', array(
        '%skipbotcha' => t('skip BOTCHA'),
        '@perm' => url('admin/people/permissions/list', array(
          'fragment' => 'module-' . 'botcha',
        )),
      )) . '</p>';
      $output .= '<p>' . t('Select which forms to protect with BOTCHA.');
      return $output;
    case Botcha::ADMIN_PATH . '/recipebook':
      $output = t('Recipe book is a glue that connects all the parts. Each recipe book is binded to the forms in one hand and to the recipes - in another.');
      return $output;
  }
}