| Line # | Frequency | Source Line |
| 1 | | <?php |
| 2 | | // $Id: help.module,v 1.78 2007/12/14 18:08:46 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 | 1 | '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 | 1 | foreach (module_implements('help', TRUE) as $module) { |
| 22 | | $items['admin/help/'. $module] = array( |
| 23 | 1 | 'title' => $module, |
| 24 | | 'page callback' => 'help_page', |
| 25 | | 'page arguments' => array(2), |
| 26 | | 'type' => MENU_CALLBACK, |
| 27 | | 'file' => 'help.admin.inc', |
| 28 | | ); |
| 29 | | } |
| 30 | | |
| 31 | 1 | return $items; |
| 32 | | } |
| 33 | | |
| 34 | | /** |
| 35 | | * Implementation of hook_help(). |
| 36 | | */ |
| 37 | | function help_help($path, $arg) { |
| 38 | | switch ($path) { |
| 39 | | case 'admin/help': |
| 40 | | $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>'; |
| 41 | | return $output; |
| 42 | | case 'admin/help#help': |
| 43 | | $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>'; |
| 44 | | $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>'; |
| 45 | | return $output; |
| 46 | | } |
| 47 | | } |