help.module

You are here

  1. 7 modules/help/help.module
  2. 4.6 modules/help.module
  3. 4.7 modules/help.module
  4. 5 modules/help/help.module
  5. 6 modules/help/help.module
  6. 8 core/modules/help/help.module

Manages displaying online help.

Functions

Namesort descending Description
help_help Implements hook_help().
help_menu Implements hook_menu().

File

modules/help/help.module
View source
  1. <?php
  2. /**
  3. * @file
  4. * Manages displaying online help.
  5. */
  6. /**
  7. * Implements hook_menu().
  8. */
  9. function help_menu() {
  10. $items['admin/help'] = array(
  11. 'title' => 'Help',
  12. 'description' => 'Reference for usage, configuration, and modules.',
  13. 'page callback' => 'help_main',
  14. 'access arguments' => array('access administration pages'),
  15. 'weight' => 9,
  16. 'file' => 'help.admin.inc',
  17. );
  18. foreach (module_implements('help', TRUE) as $module) {
  19. $items['admin/help/' . $module] = array(
  20. 'title' => $module,
  21. 'page callback' => 'help_page',
  22. 'page arguments' => array(2),
  23. 'access arguments' => array('access administration pages'),
  24. 'type' => MENU_VISIBLE_IN_BREADCRUMB,
  25. 'file' => 'help.admin.inc',
  26. );
  27. }
  28. return $items;
  29. }
  30. /**
  31. * Implements hook_help().
  32. */
  33. function help_help($path, $arg) {
  34. switch ($path) {
  35. case 'admin/help':
  36. $output = '<p>' . t('Follow these steps to set up and start using your website:') . '</p>';
  37. $output .= '<ol>';
  38. $output .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href="@admin">administration section</a>, where you can <a href="@config">customize and configure</a> all aspects of your website.', array('@admin' => url('admin'), '@config' => url('admin/config'))) . '</li>';
  39. $output .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.', array('@modules' => url('admin/modules'), '@download_modules' => 'http://drupal.org/project/modules')) . '</li>';
  40. $output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/appearance'), '@download_themes' => 'http://drupal.org/project/themes')) . '</li>';
  41. $output .= '<li>' . t('<strong>Start posting content</strong> Finally, you can <a href="@content">add new content</a> for your website.', array('@content' => url('node/add'))) . '</li>';
  42. $output .= '</ol>';
  43. $output .= '<p>' . t('For more information, refer to the specific topics listed in the next section or to the <a href="@handbook">online Drupal handbooks</a>. You may also post at the <a href="@forum">Drupal forum</a> or view the wide range of <a href="@support">other support options</a> available.', array('@help' => url('admin/help'), '@handbook' => 'http://drupal.org/documentation', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support')) . '</p>';
  44. return $output;
  45. case 'admin/help#help':
  46. $output = '';
  47. $output .= '<h3>' . t('About') . '</h3>';
  48. $output .= '<p>' . t('The Help module provides <a href="@help-page">Help reference pages</a> and context-sensitive advice to guide you through the use and configuration of modules. It is a starting point for the online <a href="@handbook">Drupal handbooks</a>. The handbooks contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the online handbook entry for the <a href="@help">Help module</a>.', array('@help' => 'http://drupal.org/documentation/modules/help/', '@handbook' => 'http://drupal.org/documentation', '@help-page' => url('admin/help'))) . '</p>';
  49. $output .= '<h3>' . t('Uses') . '</h3>';
  50. $output .= '<dl>';
  51. $output .= '<dt>' . t('Providing a help reference') . '</dt>';
  52. $output .= '<dd>' . t('The Help module displays explanations for using each module listed on the main <a href="@help">Help reference page</a>.', array('@help' => url('admin/help'))) . '</dd>';
  53. $output .= '<dt>' . t('Providing context-sensitive help') . '</dt>';
  54. $output .= '<dd>' . t('The Help module displays context-sensitive advice and explanations on various pages.') . '</dd>';
  55. $output .= '</dl>';
  56. return $output;
  57. }
  58. }