webmaster@1
|
1 <?php |
webmaster@1
|
2 // $Id: help.module,v 1.78 2007/12/14 18:08:46 goba Exp $ |
webmaster@1
|
3 |
webmaster@1
|
4 /** |
webmaster@1
|
5 * @file |
webmaster@1
|
6 * Manages displaying online help. |
webmaster@1
|
7 */ |
webmaster@1
|
8 |
webmaster@1
|
9 /** |
webmaster@1
|
10 * Implementation of hook_menu(). |
webmaster@1
|
11 */ |
webmaster@1
|
12 function help_menu() { |
webmaster@1
|
13 $items['admin/help'] = array( |
webmaster@1
|
14 'title' => 'Help', |
webmaster@1
|
15 'page callback' => 'help_main', |
webmaster@1
|
16 'access arguments' => array('access administration pages'), |
webmaster@1
|
17 'weight' => 9, |
webmaster@1
|
18 'file' => 'help.admin.inc', |
webmaster@1
|
19 ); |
webmaster@1
|
20 |
webmaster@1
|
21 foreach (module_implements('help', TRUE) as $module) { |
webmaster@1
|
22 $items['admin/help/'. $module] = array( |
webmaster@1
|
23 'title' => $module, |
webmaster@1
|
24 'page callback' => 'help_page', |
webmaster@1
|
25 'page arguments' => array(2), |
webmaster@1
|
26 'type' => MENU_CALLBACK, |
webmaster@1
|
27 'file' => 'help.admin.inc', |
webmaster@1
|
28 ); |
webmaster@1
|
29 } |
webmaster@1
|
30 |
webmaster@1
|
31 return $items; |
webmaster@1
|
32 } |
webmaster@1
|
33 |
webmaster@1
|
34 /** |
webmaster@1
|
35 * Implementation of hook_help(). |
webmaster@1
|
36 */ |
webmaster@1
|
37 function help_help($path, $arg) { |
webmaster@1
|
38 switch ($path) { |
webmaster@1
|
39 case 'admin/help': |
webmaster@1
|
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>'; |
webmaster@1
|
41 return $output; |
webmaster@1
|
42 case 'admin/help#help': |
webmaster@1
|
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>'; |
webmaster@1
|
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>'; |
webmaster@1
|
45 return $output; |
webmaster@1
|
46 } |
webmaster@1
|
47 } |