You are here

function geshifilter_help in GeSHi Filter for syntax highlighting 7

Same name and namespace in other branches
  1. 8.2 geshifilter.module \geshifilter_help()
  2. 8 geshifilter.module \geshifilter_help()
  3. 5.2 geshifilter.module \geshifilter_help()
  4. 5 geshifilter.module \geshifilter_help()
  5. 6 geshifilter.module \geshifilter_help()

Implements hook_help().

File

./geshifilter.module, line 41
An input filter for syntax highlighting using the GeSHi library.

Code

function geshifilter_help($path, $arg) {
  switch ($path) {
    case 'admin/config/content/formats/geshifilter':
    case 'admin/help#geshifilter':
      $output = '<p>' . t('The GeSHi filter module provides a filter for syntax highlighting of inline source code or blocks of source code based on the PHP library !GeSHi.', array(
        '!GeSHi' => l('GeSHi (Generic Syntax Highlighter)', 'http://qbnz.com/highlighter/'),
      )) . '</p>';
      if ($path == 'admin/help#geshifilter') {
        $output .= '<p>' . t('The GeSHi filter module for Drupal requires the GeSHi library (version 1.0.x) to work. The GeSHi filter is actually just a Drupal wrapper module around the GeSHi library. Because of <a href="!repositorypolicies">drupal.org repository policies</a> however, the GeSHi library is not included in the GeSHi filter package, so you should <a href="!geshi">download</a> and install the GeSHi library separately.', array(
          '!repositorypolicies' => url('http://drupal.org/node/66113'),
          '!geshi' => url('http://qbnz.com/highlighter/'),
        )) . '</p>';
        $output .= t('<p>Quick overview of how to set up and use the GeSHi filter:</p><ul><li>Install the GeSHi library and specify its path on the <a href="!geshifilter_settings">GeSHi filter administration page</a>.</li><li>Configure the <a href="!geshifilter_settings">general GeSHi filter settings</a>.</li><li><a href="!geshifilter_languages">Enable the relevant languages</a> for your site and set their language tags if needed.</li><li>Enable the GeSHi filter in the desired !inputformats.</li><li>Check for !filterconflicts and resolve them.</li><li>Use the text format during content submission as described in the !filtertips.</li></ul>', array(
          '!geshifilter_settings' => url('admin/config/content/formats/geshifilter'),
          '!geshifilter_languages' => url('admin/config/content/formats/geshifilter/languages/all'),
          '!inputformats' => l(t('text formats'), 'admin/config/content/formats'),
          '!filterconflicts' => l(t('filter conflicts'), 'admin/config/content/formats/geshifilter/filterconflicts'),
          '!filtertips' => l(t('filter tips'), 'filter/tips'),
        ));
      }
      return $output;
      break;
    case 'admin/config/content/formats/geshifilter/languages':
    case 'admin/config/content/formats/geshifilter/languages/enabled':
    case 'admin/config/content/formats/geshifilter/languages/all':
    case 'admin/config/content/formats/geshifilter/languages/disabled':
      $output = '<p>' . t('Here you can enable/disable the desired languages to use. It is suggested to disable languages that are not relevant for you site not only to avoid unnecessary cluttering of the GeSHi filter configuration pages and the !filtertips, but also to make the GeSHi filter processing lighter.', array(
        '!filtertips' => l(t('filter tips'), 'filter/tips'),
      )) . '</p>';
      if (!geshifilter_use_format_specific_options()) {
        $output .= '<p>' . t('You can also define the language specific tags here.') . '</p>';
      }
      return $output;
      break;
  }
}