[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/modules/help/ -> help.module (source)

   1  <?php
   2  // $Id: help.module,v 1.78.2.1 2008/04/09 21:11:48 goba Exp $
   3  
   4  /**
   5   * @file
   6   * Manages displaying online help.
   7   */
   8  
   9  /**
  10   * Implementation of hook_menu().
  11   */
  12  function help_menu() {
  13    $items['admin/help'] = array(
  14      'title' => 'Help',
  15      'page callback' => 'help_main',
  16      'access arguments' => array('access administration pages'),
  17      'weight' => 9,
  18      'file' => 'help.admin.inc',
  19    );
  20  
  21    foreach (module_implements('help', TRUE) as $module) {
  22      $items['admin/help/'. $module] = array(
  23        'title' => $module,
  24        'page callback' => 'help_page',
  25        'page arguments' => array(2),
  26        'access arguments' => array('access administration pages'),
  27        'type' => MENU_CALLBACK,
  28        'file' => 'help.admin.inc',
  29      );
  30    }
  31  
  32    return $items;
  33  }
  34  
  35  /**
  36   * Implementation of hook_help().
  37   */
  38  function help_help($path, $arg) {
  39    switch ($path) {
  40      case 'admin/help':
  41        $output = '<p>'. t('This guide provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
  42        return $output;
  43      case 'admin/help#help':
  44        $output = '<p>'. t('The help module provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
  45        $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@help">Help module</a>.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'</p>';
  46        return $output;
  47    }
  48  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7