Mercurial > defr > drupal > core
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules/help/help.module Tue Dec 23 14:28:28 2008 +0100 @@ -0,0 +1,47 @@ +<?php +// $Id: help.module,v 1.78 2007/12/14 18:08:46 goba Exp $ + +/** + * @file + * Manages displaying online help. + */ + +/** + * Implementation of hook_menu(). + */ +function help_menu() { + $items['admin/help'] = array( + 'title' => 'Help', + 'page callback' => 'help_main', + 'access arguments' => array('access administration pages'), + 'weight' => 9, + 'file' => 'help.admin.inc', + ); + + foreach (module_implements('help', TRUE) as $module) { + $items['admin/help/'. $module] = array( + 'title' => $module, + 'page callback' => 'help_page', + 'page arguments' => array(2), + 'type' => MENU_CALLBACK, + 'file' => 'help.admin.inc', + ); + } + + return $items; +} + +/** + * Implementation of hook_help(). + */ +function help_help($path, $arg) { + switch ($path) { + case 'admin/help': + $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>'; + return $output; + case 'admin/help#help': + $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>'; + $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>'; + return $output; + } +}