annotate modules/help/help.module @ 5:2427550111ae 6.2

Drupal 6.2
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:30:08 +0100
parents c1f4ac30525a
children
rev   line source
webmaster@1 1 <?php
webmaster@5 2 // $Id: help.module,v 1.78.2.1 2008/04/09 21:11:48 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@5 26 'access arguments' => array('access administration pages'),
webmaster@1 27 'type' => MENU_CALLBACK,
webmaster@1 28 'file' => 'help.admin.inc',
webmaster@1 29 );
webmaster@1 30 }
webmaster@1 31
webmaster@1 32 return $items;
webmaster@1 33 }
webmaster@1 34
webmaster@1 35 /**
webmaster@1 36 * Implementation of hook_help().
webmaster@1 37 */
webmaster@1 38 function help_help($path, $arg) {
webmaster@1 39 switch ($path) {
webmaster@1 40 case 'admin/help':
webmaster@1 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>';
webmaster@1 42 return $output;
webmaster@1 43 case 'admin/help#help':
webmaster@1 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>';
webmaster@1 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>';
webmaster@1 46 return $output;
webmaster@1 47 }
webmaster@1 48 }