Mercurial > defr > drupal > core
comparison modules/help/help.module @ 1:c1f4ac30525a 6.0
Drupal 6.0
| author | Franck Deroche <webmaster@defr.org> |
|---|---|
| date | Tue, 23 Dec 2008 14:28:28 +0100 |
| parents | |
| children | 2427550111ae |
comparison
equal
deleted
inserted
replaced
| 0:5a113a1c4740 | 1:c1f4ac30525a |
|---|---|
| 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 '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 'type' => MENU_CALLBACK, | |
| 27 'file' => 'help.admin.inc', | |
| 28 ); | |
| 29 } | |
| 30 | |
| 31 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 } |
