'Help', 'page callback' => 'help_main', 'access arguments' => array('access administration pages'), 'weight' => 9, ); 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, ); } return $items; } /** * Menu callback; prints a page listing a glossary of Drupal terminology. */ function help_main() { // Add CSS drupal_add_css(drupal_get_path('module', 'help') .'/help.css', 'module', 'all', FALSE); $output = t('
Help is available on the following items:
!help_pagesThis guide explains what the various modules in Drupal do and how to configure them. Additionally, you will find a glossary of basic Drupal terminology to help get you started.
It is not a substitute for the Drupal handbook available online and should be used in conjunction with it. The online reference handbook might be more up-to-date and has helpful user-contributed comments. It is your definitive reference point for all Drupal documentation.
', array('@Drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')); return $output; case 'admin/help#help': $output = ''. t('The help module displays context sensitive help information. Users can learn how to use modules and accomplish tasks quicker with less errors by clicking on links in provided by the help module.') .'
'; $output .= t("Modules can make documentation available to other modules with this module. All user help should be presented using this module. Some examples of help:
'. t('For more information please read the configuration and customization handbook Help page.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'
'; return $output; } } /** * Menu callback; prints a page listing general help for a module. */ function help_page($name) { $output = ''; if (module_hook($name, 'help')) { $module = drupal_parse_info_file(drupal_get_path('module', $name) .'/'. $name .'.info'); drupal_set_title($module['name']); $temp = module_invoke($name, 'help', "admin/help#$name", drupal_help_arg()); if (empty($temp)) { $output .= t("No help is available for module %module.", array('%module' => $module['name'])); } else { $output .= $temp; } $admin_tasks = system_get_module_admin_tasks($name); ksort($admin_tasks); $output .= theme('item_list', $admin_tasks, t('@module administration pages', array('@module' => $module['name']))); } return $output; }