You are here

function customfilter_help in Custom filter 5

Same name and namespace in other branches
  1. 6 customfilter.module \customfilter_help()
  2. 7.2 customfilter.module \customfilter_help()
  3. 7 customfilter.module \customfilter_help()
  4. 2.0.x customfilter.module \customfilter_help()

Implements hook_help().

File

./customfilter.module, line 47

Code

function customfilter_help($section) {
  $arg3 = arg(3);
  $arg4 = arg(4);
  $help = '';
  $sid = isset($arg3) && is_numeric($arg3) ? $arg3 : '';
  $fid = isset($arg4) && is_numeric($arg4) ? $arg4 : '';
  switch ($section) {
    case "admin/modules#description":
      $help = t('Custom Filter');
      break;
    case "admin/settings/customfilter":
      $help = '<p>' . t('Custom Filter provides an ability for creating user defined filters using regular expressions. Instead of creating filter modules, users can create their own filter for specific site purpose.') . '</p>';
      if (count(customfilter_get_sets()) > 0) {
        $help .= '<p>' . t('Below are the filter sets. ');
      }
      else {
        $help .= '<p>' . t('Before you can use custom filters, you must have at least one filter set. ');
      }
      $help .= t('Filter set is a container of filters. Each will appear in Input Format configuration. Click at their name to see what filter they have.') . '</p>';
      break;
    case "admin/settings/customfilter/export":
      $help = '<p>' . t('You can export your custom filters as XML document. Just check filters you want to export below, and click the button Export.') . '</p>';
      break;
    case "admin/settings/customfilter/import":
      $help = '<p>' . t('You can import custom filters from an XML file.') . '</p>';
      break;
    case "admin/settings/customfilter/{$sid}":
      $help = '<p>' . t('This filterset has filters listed below. Each filter can have subfilters.') . '</p>';
      break;
    case "admin/settings/customfilter/add":
    case "admin/settings/customfilter/{$sid}/edit":
      $help = '<p>' . t('Give this filter set some name and description.') . '</p>';
      break;
    case "admin/settings/customfilter/{$sid}/add":
    case "admin/settings/customfilter/{$sid}/{$fid}":
    case "admin/settings/customfilter/{$sid}/{$fid}/edit":
    case "admin/settings/customfilter/{$sid}/{$fid}/add":
      $help = '<p>' . t('Here you can define your own filters using regular expressions. For some information about regular expressions, please look at ') . l('http://www.regular-expressions.info', 'http://www.regular-expressions.info') . '</p>';
      break;
  }
  return $help;
}