help.module

  1. 7.x drupal-7.x/modules/help/help.module
  2. 6.x drupal-6.x/modules/help/help.module

Manages displaying online help.

File

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