diff --git a/includes/common.inc b/includes/common.inc index e380270..3e82003 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3525,6 +3525,21 @@ function element_children(&$elements, $sort = FALSE) { } /** + * Determine whether help topics for a given module exist. + * + * @param $module + * The module name. + * @return + * TRUE if the module is enabled and provides help topics, and the help module is enabled. + */ +function help_exists($module) { + if (drupal_function_exists('help_get_topics') && module_exists($module)) { + $topics = help_get_topics(); + return isset($topics[$module]); + } +} + +/** * Provide theme registration for themes across .inc files. */ function drupal_common_theme() { @@ -3596,8 +3611,8 @@ function drupal_common_theme() { 'list' => array( 'arguments' => array('elements' => NULL), ), - 'more_help_link' => array( - 'arguments' => array('url' => NULL), + 'help_link' => array( + 'arguments' => array('module' => NULL, 'topic' => NULL, 'title' => NULL, 'attributes' => NULL), ), 'xml_icon' => array( 'arguments' => array('url' => NULL), diff --git a/includes/menu.inc b/includes/menu.inc index 9d50428..62cd96e 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1299,10 +1299,9 @@ function menu_get_active_help() { if ($help = $function($router_path, $arg)) { $output .= $help . "\n"; } - // Add "more help" link on admin pages if the module provides a - // standalone help page. - if ($arg[0] == "admin" && module_exists('help') && $function('admin/help#' . $arg[2], $empty_arg) && $help) { - $output .= theme("more_help_link", url('admin/help/' . $arg[2])); + // Add "more help" link on admin pages if the module provides help topics. + if ($arg[0] == "admin" && help_exists($arg[2]) && $help) { + $output .= theme("help_link", $arg[2]); } } return $output; diff --git a/includes/theme.inc b/includes/theme.inc index fd28cd1..0c43e3b 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1590,13 +1590,6 @@ function theme_list($elements) { } /** - * Returns code that emits the 'more help'-link. - */ -function theme_more_help_link($url) { - return ''; -} - -/** * Return code that emits an XML icon. * * For most use cases, this function has been superseded by theme_feed_icon(). diff --git a/modules/blog/blog.test b/modules/blog/blog.test index e8dd6dd..9b986b1 100644 --- a/modules/blog/blog.test +++ b/modules/blog/blog.test @@ -91,15 +91,6 @@ class BlogTestCase extends DrupalWebTestCase { $response2 = ($admin) ? 200 : 403; - // View blog help node. - $this->drupalGet('admin/help/blog'); - $this->assertResponse($response2); - if ($response2 == 200) { - $this->assertTitle(t('Blog | Drupal'), t('Blog help node was displayed')); - $this->assertText(t('Blog'), t('Blog help node was displayed')); - $this->assertText(t('Home ' . $crumb . ' Administer ' . $crumb . ' Help'), t('Breadcrumbs were displayed')); - } - // Verify the blog block was displayed. $this->drupalGet(''); $this->assertResponse(200); diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test index 1a15f30..4abd3a0 100644 --- a/modules/dblog/dblog.test +++ b/modules/dblog/dblog.test @@ -118,13 +118,6 @@ class DBLogTestCase extends DrupalWebTestCase { private function verifyReports($response = 200) { $quote = '''; - // View dblog help node. - $this->drupalGet('admin/help/dblog'); - $this->assertResponse($response); - if ($response == 200) { - $this->assertText(t('Database logging'), t('DBLog help was displayed')); - } - // View dblog report node. $this->drupalGet('admin/reports/dblog'); $this->assertResponse($response); diff --git a/modules/field/help/field.help b/modules/field/help/field.help index 0f9cb97..0e6e118 100644 --- a/modules/field/help/field.help +++ b/modules/field/help/field.help @@ -1,5 +1,5 @@ ; $Id$ [about] -title = About Color +title = About Field file = about weight = -10 \ No newline at end of file diff --git a/modules/forum/forum.test b/modules/forum/forum.test index 2213a10..13ff613 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -279,15 +279,6 @@ class ForumTestCase extends DrupalWebTestCase { $response2 = ($admin) ? 200 : 403; - // View forum help node. - $this->drupalGet('admin/help/forum'); - $this->assertResponse($response2); - if ($response2 == 200) { - $this->assertTitle(t('Forum | Drupal'), t('Forum help node was displayed')); - $this->assertText(t('Forum'), t('Forum help node was displayed')); - $this->assertText(t('Home ' . $crumb . ' Administer ' . $crumb . ' Help'), t('Breadcrumbs were displayed')); - } - // Verify the forum blocks were displayed. $this->drupalGet(''); $this->assertResponse(200); diff --git a/modules/help/help-rtl.css b/modules/help/help-rtl.css index e7162b8..ade9ded 100644 --- a/modules/help/help-rtl.css +++ b/modules/help/help-rtl.css @@ -9,3 +9,15 @@ padding-right: 0; padding-left: 0; } + +.help-topic .toc-block { + float: left; +} + +.help-left { + float: right; +} + +.help-right { + float: left; +} diff --git a/modules/help/help.admin.inc b/modules/help/help.admin.inc index 2d631b2..e415feb 100644 --- a/modules/help/help.admin.inc +++ b/modules/help/help.admin.inc @@ -3,74 +3,670 @@ /** * @file - * Admin page callbacks for the help module. + * Page callbacks for the help module. */ /** - * Menu callback; prints a page listing a glossary of Drupal terminology. + * Menu callback; Returns a page displaying available help topics for modules. + * + * @return + * A page displaying available help topics for modules. */ -function help_main() { - // Add CSS - drupal_add_css(drupal_get_path('module', 'help') . '/help.css', array('preprocess' => FALSE)); - $output = '

' . t('Help topics') . '

' . t('Help is available on the following items:') . '

' . help_links_as_list(); +function help_by_module() { + $items = array(); + $menu_items = array(); + + // Load available help topics. + $topics = help_get_topics(); + $settings = help_get_settings(); + + // Load the topic hierarchy. + help_get_topic_hierarchy($topics); + + // Traverse through modules looking for available help. + $modules = module_rebuild_cache(); + foreach ($modules as $file) { + $module = $file->name; + if (empty($topics[$module]) || !empty($settings[$module]['hide'])) { + continue; + } + + // Fetch help links. + $items = help_get_tree($topics, $topics[$module]['']['children'], array(), 0); + + // Sort in ascending order of keys. + ksort($items); + + // Retrieve the name to use. + if (isset($settings[$module]['index name'])) { + $name = $settings[$module]['index name']; + } + elseif (isset($settings[$module]['name'])) { + $name = $settings[$module]['name']; + } + else { + $name = t($file->info['name']); + } + + // Store the available help topic links for the module. + $menu_items[$name] = array($file->info['description'], $items); + } + + drupal_add_css(drupal_get_path('module', 'help') . '/help.css'); + return theme('system_admin_by_module', $menu_items); +} + +/** + * Menu callback; returns a page with help topic for a module. + * + * @param $module + * The module that owns this help topic page. + * @param $topic + * Optional identifier for the topic. NULL value displays all available topics. + * + * @return + * Themed output of a help topic page. + */ +function help_topic_page($module, $topic = NULL) { + $info = help_get_topic_info($module, $topic); + if (isset($topic) && !$info) { + // Return error 404 if the topic does not exist. + return drupal_not_found(); + } + + drupal_set_title($info['title']); + + // Set up breadcrumb. + $breadcrumb = array(); + + $parent = $info; + $parent_module = $module; + + $checked = array(); + // Crawl up parent tree looking for the breadcrumb trail. + while (!empty($parent['parent'])) { + if (strpos($parent['parent'], '%')) { + list($parent_module, $parent_topic) = explode('%', $parent['parent']); + } + else { + $parent_topic = $parent['parent']; + } + + // Mark the topic as checked to prevent processing again. + if (!empty($checked[$parent_module][$parent_topic])) { + break; + } + $checked[$parent_module][$parent_topic] = TRUE; + + $parent = help_get_topic_info($parent_module, $parent_topic); + if (!$parent) { + break; + } + + // Add the current topic to the breadcrumb. + $breadcrumb[] = help_l($parent['title'], "admin/help/$parent_module/$parent_topic"); + } + + $output = help_view_topic($module, $topic); + if (empty($output)) { + $output = help_view_module($module); + drupal_set_title(t('@module', array('@module' => help_get_module_name($module)))); + } + else { + $breadcrumb[] = help_l(help_get_module_name($parent_module), "admin/help/$parent_module"); + } + + $breadcrumb[] = help_l(t('Help'), "admin/help"); + $breadcrumb[] = help_l(t('Administer'), 'admin'); + $breadcrumb[] = l(t('Home'), ''); + drupal_set_breadcrumb(array_reverse($breadcrumb)); + drupal_add_css(drupal_get_path('module', 'help') . '/help.css'); + return $output; } /** - * Menu callback; prints a page listing general help for a module. + * Load and render a help topics listing. + * @param $module + * The module name of the topics to list. + * + * @return + * Themed output of links to help topics. */ -function help_page($name) { +function help_view_module($module) { $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'])); + $items = array(); + $topics = help_get_topics(); + + help_get_topic_hierarchy($topics); + + if (!empty($topics[$module])) { + $items = help_get_tree($topics, $topics[$module]['']['children'], array(), 0); + $output = theme('item_list', $items, NULL, 'ul', array('class' => 'toc')); + } + else { + $output = t('No help topic on this subject is available.'); + } + + return $output; +} + +/** + * Load and render a help topic. + * + * @param $module + * The module that owns this help topic. + * @param $topic + * The topic to render. + * + * @return + * Themed output of the help topic. + */ +function help_view_topic($module, $topic) { + if ($file_info = help_get_topic_file_info($module, $topic)) { + $info = help_get_topic_info($module, $topic); + $file = './' . $file_info['path'] . '/' . $file_info['file']; + $output = file_get_contents($file); + + global $base_path; + + // Change '[path]' to the URL to the base help directory. + $output = str_replace('[path]', $base_path . $info['path'] . '/', $output); + + // Change '[trans_path]' to the URL to the actual help directory. + $output = str_replace('[trans_path]', $base_path . $file_info['path'] . '/', $output); + + // Change '[base_url]' to the base URL to the site. + $output = str_replace('[base_url]', $base_path, $output); + + // Change '[url:X]' to the URL to the site. + $output = preg_replace('/\[url:([^"]+)\]/', strtr(url('$1'), array('%24' => '$')), $output); + + // Run the line break filter if requested. + if (!empty($info['line break'])) { + // Remove the header since it adds an extra
to the filter. + $output = preg_replace('/^\n/', '', $output); + $output = filter_filter('process', 1, -1, $output); } - else { - $output .= $temp; + + if (!empty($info['navigation'])) { + $topics = help_get_topics(); + help_get_topic_hierarchy($topics); + + if (!empty($topics[$module]['']['children'])) { + $tree = array($topic); + if (!empty($topics[$module][$topic]['parent'])) { + array_push($tree, $topics[$module][$topic]['parent']); + } + $items = help_get_tree($topics, $topics[$module]['']['children'], $tree); + if (count($items) > 1) { + // Render the table of contents block to display links to parent and sibling topics. + $output = theme('item_list', $items, NULL, 'ul', array('class' => 'toc-block')) . $output; + } + } + + if (!empty($topics[$module][$topic]['children'])) { + $items = help_get_tree($topics, $topics[$module][$topic]['children']); + // Render an ordered list to display links to immediate children. + $output .= theme('item_list', $items, NULL, 'ul', array('class' => 'toc')); + } + + // Determine the path for "Up" link. + list($parent_module, $parent_topic) = $topics[$module][$topic]['_parent']; + if ($parent_topic) { + // Link to a parent topic. + $parent = $topics[$module][$topic]['_parent']; + $up = "admin/help/$parent[0]/$parent[1]"; + } + else { + $up = "admin/help/$module"; + } + + $siblings = $topics[$parent_module][$parent_topic]['children']; + // Sort topics according to weight. + uasort($siblings, '_help_uasort'); + $prev = $next = NULL; + $found = FALSE; + // Find the previous and next topic. + foreach ($siblings as $sibling) { + list($sibling_module, $sibling_topic) = $sibling; + if ($found) { + $next = $sibling; + break; + } + if ($sibling_module == $module && $sibling_topic == $topic) { + $found = TRUE; + continue; + } + $prev = $sibling; + } + + // Bottom navigation links. + if ($prev || $up || $next) { + $navigation = '
'; + + if ($prev) { + $navigation .= help_l('‹‹ ' . $topics[$prev[0]][$prev[1]]['title'], "admin/help/$prev[0]/$prev[1]", array('attributes' => array('class' => 'help-left'))); + } + if ($up) { + $navigation .= help_l(t('Up'), $up, array('attributes' => array('class' => $prev ? 'help-up' : 'help-up-noleft'))); + } + if ($next) { + $navigation .= help_l($topics[$next[0]][$next[1]]['title'] . ' ››', "admin/help/$next[0]/$next[1]", array('attributes' => array('class' => 'help-right'))); + } + + $navigation .= '
'; + + $output .= $navigation; + } } - // Only print list of administration pages if the module in question has - // any such pages associated to it. - $admin_tasks = system_get_module_admin_tasks($name); - if (!empty($admin_tasks)) { - ksort($admin_tasks); - $output .= theme('item_list', $admin_tasks, t('@module administration pages', array('@module' => $module['name']))); + if (!empty($info['css'])) { + drupal_add_css($info['path'] . '/' . $info['css']); } + return '
' . $output . '
'; + } +} + + + +/** + * Theme a help topic. + * + * @param $content + * The main help content. + * @param $navigation + * Array of entries for the floating navigation block. + * @param $children + * Array of links to the immediate children of the topic. + * @param $links + * Array of links for next, up, and previous topics. + */ +function theme_help_topic($content = '', $navigation = array(), $children = array(), $links = array()) { + $output = '
'; + // Render navigation block. + if (!empty($navigation)) { + $output .= theme('item_list', $navigation, NULL, 'ul', array('class' => 'toc-block')); + } + // Add main content. + $output .= $content; + // Render children links. + if (!empty($children)) { + $output .= theme('item_list', $children, NULL, 'ul', array('class' => 'toc')); } + // Render next, up, previous links. + if (!empty($links)) { + $output .= '
'; + foreach ($links as $link) { + $output .= l($link['title'], $link['href'], $link); + } + $output .= '
'; + } + + $output .= '
'; + return $output; } -function help_links_as_list() { - $empty_arg = drupal_help_arg(); - $module_info = module_rebuild_cache(); +/** + * Build a tree of help topics. + * + * @param $topics + * An array of topics. + * @param $topic_ids + * An array of child topic_ids. + * @param $tree_parents + * And array of topic ids of self and the immediate parent topic(s). + * @param $max_depth + * The maximum depth of children. + * @param $depth + * The current depth. + * + * @return + * An array of topics. +*/ +function help_get_tree($topics, $topic_ids, $tree_parents = array(), $max_depth = -1, $depth = 0) { + $items = array(); + + if (!empty($topic_ids)) { + uasort($topic_ids, '_help_uasort'); + foreach ($topic_ids as $info) { + list($module, $topic) = $info; + $item = help_l($topics[$module][$topic]['title'], "admin/help/$module/$topic"); + if (!empty($tree_parents) && $topic == end($tree_parents)) { + $children = !empty($topics[$module][$topic]['children']) ? $topics[$module][$topic]['children'] : array(); + $item .= theme('item_list', help_get_tree($topics, $children, $tree_parents, $max_depth, $depth + 1)); + } + elseif (empty($tree_parents) && !empty($topics[$module][$topic]['children']) && ($max_depth == -1 || $depth < $max_depth)) { + $item .= theme('item_list', help_get_tree($topics, $topics[$module][$topic]['children'], $tree_parents, $max_depth, $depth + 1)); + } + + $items[] = $item; + } + } + + return $items; +} + +/** + * Build a hierarchy for a single module's topics. + * + * @param topics + * Array of modules topics. + * + */ +function help_get_topic_hierarchy(&$topics) { + foreach ($topics as $module => $module_topics) { + foreach ($module_topics as $topic => $info) { + $parent_module = $module; + // We have a blank topic that we don't want parented to itself. + if (!$topic) { + continue; + } + + if (empty($info['parent'])) { + $parent = ''; + } + elseif (strpos($info['parent'], '%')) { + list($parent_module, $parent) = explode('%', $info['parent']); + if (empty($topics[$parent_module][$parent])) { + // If this item's parent is unavailable, + // treat it as top level instead. + $parent = ''; + } + } + else { + $parent = $info['parent']; + if (empty($module_topics[$parent])) { + // If this item's parent is unavailable, + // treat it as top level instead. + $parent = ''; + } + } - $modules = array(); - foreach (module_implements('help', TRUE) as $module) { - if (module_invoke($module, 'help', "admin/help#$module", $empty_arg)) { - $modules[$module] = $module_info[$module]->info['name']; + if (!isset($topics[$parent_module][$parent]['children'])) { + $topics[$parent_module][$parent]['children'] = array(); + } + $topics[$parent_module][$parent]['children'][] = array($module, $topic); + $topics[$module][$topic]['_parent'] = array($parent_module, $parent); } } - asort($modules); - - // Output pretty four-column list - $count = count($modules); - $break = ceil($count / 4); - $output = '
'; - return $output; + return $cache; } +/** + * Sort topic information array in ascending order. + * + * @param $id_a + * Module/topic 1 + * @param $id_b + * Module/topic 2 + * + * @return + * -1 = $id_a comes before $id_b. + * 1 = $id_b comes before $id_a. + */ +function _help_uasort($id_a, $id_b) { + $topics = help_get_topics(); + + list($module_a, $topic_a) = $id_a; + $a = $topics[$module_a][$topic_a]; + + list($module_b, $topic_b) = $id_b; + $b = $topics[$module_b][$topic_b]; + + $a_weight = isset($a['weight']) ? $a['weight'] : 0; + $b_weight = isset($b['weight']) ? $b['weight'] : 0; + // Sort by topic weight when weights are unequal. + if ($a_weight != $b_weight) { + return ($a_weight < $b_weight) ? -1 : 1; + } + + // Otherwise sort by the title. + if ($a['title'] != $b['title']) { + return ($a['title'] < $b['title']) ? -1 : 1; + } + + return 0; +} + +/** + * Return help topic filename. + * + * @param $module + * The module that owns the help topic. + * @param $topic + * Name of the topic. + * + * @return + * The path to the file of the topic. + */ +function help_get_topic_filename($module, $topic) { + $info = help_get_topic_file_info($module, $topic); + if ($info) { + return "./$info[path]/$info[file]"; + } +} + +/** + * Return information for the help topic file. + * + * Checks a list of possible locations for a help topic file, allowing + * translations and the current theme to override the default + * location of the file. + * + * @param $module + * The module that owns the help topic. + * @param $topic + * Name of the topic. + * + * @return + * An array containing the path and filename of the topic. + * + */ +function help_get_topic_file_info($module, $topic) { + init_theme(); + global $language; + + $info = help_get_topic_info($module, $topic); + if (empty($info)) { + return; + } + + // Search paths: + $paths = array( + path_to_theme() . '/help', // Allow theme override. + drupal_get_path('module', $module) . "/translations/help/$language->language", // Translations. + $info['path'], // In same directory as .inc file. + ); + + foreach ($paths as $path) { + if (file_exists("./$path/$info[file]")) { + return array('path' => $path, 'file' => $info['file']); + } + } +} + +/** + * Helper function to get a module's proper name. + * + * @param $module + * Module name to look up. + * + * @return + * The name of the module. + */ +function help_get_module_name($module) { + $settings = help_get_settings(); + if (isset($settings[$module]['name'])) { + $name = $settings[$module]['name']; + } + else { + $info = db_query("SELECT * FROM {system} WHERE name = :name", array(':name' => $module))->fetchObject(); + $info = unserialize($info->info); + $name = t($info['name']); + } + return $name; +} + +/** + * Format a link to preserve popup identity. + * + * @param $text + * The text to be enclosed with the anchor tag. + * @param $path + * The Drupal path being linked to, such as "admin/content/node". Can be an + * external or internal URL. + * - If you provide the full URL, it will be considered an external URL. + * - If you provide only the path (e.g. "admin/content/node"), it is + * considered an internal link. In this case, it must be a system URL + * as the url() function will generate the alias. + * - If you provide '', it generates a link to the site's + * base URL (again via the url() function). + * - If you provide a path, and 'alias' is set to TRUE (see below), it is + * used as is. + * @param $options + * An associative array of additional options, with the following keys: + * - 'attributes' + * An associative array of HTML attributes to apply to the anchor tag. + * - 'query' + * A query string to append to the link, or an array of query key/value + * properties. + * - 'fragment' + * A fragment identifier (named anchor) to append to the link. + * Do not include the '#' character. + * - 'absolute' (default FALSE) + * Whether to force the output to be an absolute link (beginning with + * http:). Useful for links that will be displayed outside the site, such + * as in an RSS feed. + * - 'html' (default FALSE) + * Whether the title is HTML, or just plain-text. For example for making + * an image a link, this must be set to TRUE, or else you will see the + * escaped HTML. + * - 'alias' (default FALSE) + * Whether the given path is an alias already. + * @return + * An HTML string containing a link to the given path. + * + */ +function help_l($text, $dest, $options = array()) { + if (isset($_GET['popup'])) { + if (empty($options['query'])) { + $options['query'] = 'popup'; + } + } + + return l($text, $dest, $options); +} diff --git a/modules/help/help.css b/modules/help/help.css index 748e190..c93cbf8 100644 --- a/modules/help/help.css +++ b/modules/help/help.css @@ -5,6 +5,67 @@ width: 22%; padding-right: 3%; /* LTR */ } + .help-items-last { padding-right: 0; /* LTR */ } + +div.item-list ul li { + margin: .15em 0 .15em 1.5em; +} + +.help-topic code, +.help-topic pre { + background: #f1f1f1; + border: 1px solid #BFBFBF; + display: block; + font-size: 1.25em; + margin: 1em 2em; + padding: .5em; +} + +.help-topic .toc-block, .help-topic .toc { + background-color: #fff; + border: 1px solid #ddd; + float: right; /* LTR */ + margin: 0 5px; + padding: 5px 10px 5px 5px; +} + +.help-topic .toc { + display: table; + float: none; +} + +.help-navigation { + border-top: 1px dotted #ccc; +} + +.help-left { + display: block; + float: left; /* LTR */ + text-align: left; + width: 42%; +} + +.help-right { + display: block; + float: right; /* LTR */ + text-align: right; + width: 42%; +} + +.help-up { + display: block; + float: left; /* LTR */ + margin: 0 5%; + width: 4%; +} + +.help-up-noleft { + display: block; + float: left; /* LTR */ + margin: 0 5%; + text-align: right; + width: 42%; +} diff --git a/modules/help/help.module b/modules/help/help.module index af3d35d..a22070c 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -3,29 +3,45 @@ /** * @file - * Manages displaying online help. + * Manages displaying help topics. */ /** + * Implementation of hook_perm(). + */ +function help_perm() { + return array('access help' => + array( + 'title' => 'Access help', + 'description' => t('View help content.'), + ) + ); +} + +/** * Implementation of hook_menu(). */ function help_menu() { + $items = array(); + $items['admin/help'] = array( 'title' => 'Help', - 'page callback' => 'help_main', - 'access arguments' => array('access administration pages'), + 'page callback' => 'help_by_module', + 'access arguments' => array('access help'), 'weight' => 9, ); - - foreach (module_implements('help', TRUE) as $module) { - $items['admin/help/' . $module] = array( - 'title' => $module, - 'page callback' => 'help_page', - 'page arguments' => array(2), - 'access arguments' => array('access administration pages'), - 'type' => MENU_CALLBACK, - ); - } + $items['admin/help/%'] = array( + 'page callback' => 'help_topic_page', + 'page arguments' => array(2), + 'access arguments' => array('access help'), + 'type' => MENU_CALLBACK, + ); + $items['admin/help/%/%'] = array( + 'page callback' => 'help_topic_page', + 'page arguments' => array(2, 3), + 'access arguments' => array('access help'), + 'type' => MENU_CALLBACK, + ); return $items; } @@ -36,11 +52,42 @@ function help_menu() { function help_help($path, $arg) { switch ($path) { case 'admin/help': - $output = '

' . t('This guide provides context sensitive help on the use and configuration of Drupal and its modules, and is a supplement to the more extensive online Drupal handbook. 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')) . '

'; - return $output; - case 'admin/help#help': - $output = '

' . t('The help module provides context sensitive help on the use and configuration of Drupal and its modules, and is a supplement to the more extensive online Drupal handbook. 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')) . '

'; - $output .= '

' . t('For more information, see the online handbook entry for Help module.', array('@help' => 'http://drupal.org/handbook/modules/help/')) . '

'; - return $output; + return '

' . t('This guide provides context sensitive help on the use and configuration of Drupal and its modules, and is a supplement to the more extensive online Drupal handbook. 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')) . '

'; } } + +/** + * Return code that emits a link to view a help topic. + * + * @param $module + * The module that owns this help topic. + * @param $topic + * Optional identifier for the topic. NULL value displays all available topics. + * @param $title + * Optional title or label for the link. Default is "More help". + * @param $attributes + * An array of attributes to include in hyperlink. + */ +function theme_help_link($module, $topic = NULL, $title = NULL, $attributes = array()) { + if (!isset($title)) { + $title = t('More help'); + } + + // Check for the function existence and include help.admin.inc. + drupal_function_exists('help_get_topic_info'); + // Fetch the information on the module/topic. + $info = help_get_topic_info($module, $topic); + + if (isset($topic) && !$info) { + // Return if the explicitly specified topic doesn't exist. + return; + } + + // Set the topic title as the hyperlink's title attribute. + $attributes += array('title' => $info['title']); + + // Trim the trailing slash if no topic is specified. + $output = l($title, trim("admin/help/$module/$topic", '/'), array('attributes' => $attributes)); + + return ''; +} diff --git a/modules/help/help.test b/modules/help/help.test index 9d13435..5433e63 100644 --- a/modules/help/help.test +++ b/modules/help/help.test @@ -8,77 +8,44 @@ class HelpTestCase extends DrupalWebTestCase { function getInfo() { return array( 'name' => t('Help functionality'), - 'description' => t('Verify help display and user access to help based on persmissions.'), + 'description' => t('Verify help display and user access to help based on permissions.'), 'group' => t('Help'), ); } /** - * Enable modules and create users with specific permissions. - */ - function setUp() { - parent::setUp(); - - // Loading these (and other?) modules will result in failures? -// $this->drupalModuleEnable('blog'); -// $this->drupalModuleEnable('poll'); - $this->getModuleList(); - - // Create users. - $this->big_user = $this->drupalCreateUser(array('access administration pages')); // 'administer blocks', 'administer site configuration', - $this->any_user = $this->drupalCreateUser(array()); - } - - /** * Login users, create dblog events, and test dblog functionality through the admin and user interfaces. */ function testHelp() { // Login the admin user. - $this->drupalLogin($this->big_user); - $this->verifyHelp(); - - // Login the regular user. - $this->drupalLogin($this->any_user); - $this->verifyHelp(403); - } - - /** - * Verify the logged in user has the desired access to the various help nodes and the nodes display help. - * - * @param integer $response HTTP response code. - */ - private function verifyHelp($response = 200) { - $crumb = '›'; - - foreach ($this->modules as $module => $name) { - // View module help node. - $this->drupalGet('admin/help/' . $module); - $this->assertResponse($response); - if ($response == 200) { - // NOTE: The asserts fail on blog and poll because the get returns the 'admin/help' node instead of the indicated node??? -// if ($module == 'blog' || $module == 'poll') { -// continue; -// } - $this->assertTitle($name . ' | Drupal', t('[' . $module . '] Title was displayed')); - $this->assertRaw('

' . t($name) . '

', t('[' . $module . '] Heading was displayed')); - $this->assertText(t('Home ' . $crumb . ' Administer ' . $crumb . ' Help'), t('[' . $module . '] Breadcrumbs were displayed')); - } + $account = $this->drupalCreateUser(array('access administration pages', 'access help', 'administer blocks')); + $this->drupalLogin($account); + $sections = parse_ini_file('modules/help/help/help.help', TRUE); + foreach ($sections as $section => $data) { + $links[url("admin/help/help/$section")] = $data['title']; } - } - /** - * Get list of enabled modules. - * - * @return array Enabled modules. - */ - private function getModuleList() { - $this->modules = array(); - $result = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC"); - foreach ($result as $module) { - if (file_exists($module->filename)) { - $fullname = unserialize($module->info); - $this->modules[$module->name] = $fullname['name']; + foreach ($sections as $section => $data) { + $this->drupalGet("admin/help/help/$section"); + $this->assertTitle($data['title'] .' | Drupal', t('title matched')); + $help = file_get_contents("modules/help/help/$section.html"); + if (!empty($data['line break'])) { + $help = preg_replace('/^\n/', '', $help); + $help = filter_filter('process', 1, -1, $help); } - } + // There are various replaces done on the help text. We do not test + // these now, but skip text inside []. + $help_pieces = preg_split('/\[[^\]]+\]/', $help); + foreach ($help_pieces as $piece) { + $this->assertRaw($piece, t('help text found')); + } + // Check the links in the table of contents. + foreach ($links as $href => $title) { + $this->assertTrue($this->xpath('//a[text()="'. $title .'" and @href="'. $href .'"]'), t('Link @href, @title found', array('@href' => $href, '@title' => $title))); + } + } + $this->drupalGet('admin/build/block'); + $this->clickLink('More help'); + $this->assertLink('About Block', 0, t('About Block link found')); } } diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 82eef0a..57f8c35 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -85,10 +85,8 @@ function system_admin_menu_block_page() { * Menu callback; prints a listing of admin tasks for each installed module. */ function system_admin_by_module() { - $modules = module_rebuild_cache(); $menu_items = array(); - $help_arg = module_exists('help') ? drupal_help_arg() : FALSE; foreach ($modules as $file) { $module = $file->name; @@ -101,8 +99,8 @@ function system_admin_by_module() { // Only display a section if there are any available tasks. if (count($admin_tasks)) { - // Check for help links. - if ($help_arg && module_invoke($module, 'help', "admin/help#$module", $help_arg)) { + // Check for help topics. + if (help_exists($module)) { $admin_tasks[100] = l(t('Get help'), "admin/help/$module"); } @@ -598,9 +596,6 @@ function system_modules($form_state = array()) { $modules = array(); $form['modules'] = array('#tree' => TRUE); - // Used when checking if module implements a help page. - $help_arg = module_exists('help') ? drupal_help_arg() : FALSE; - // Iterate through each of the modules. foreach ($files as $filename => $module) { $extra = array(); @@ -618,12 +613,10 @@ function system_modules($form_state = array()) { $extra['requires'][$requires] = t('@module (enabled)', array('@module' => $files[$requires]->info['name'])); } } - // Generate link for module's help page, if there is one. - if ($help_arg && $module->status && in_array($filename, module_implements('help'))) { - if (module_invoke($filename, 'help', "admin/help#$filename", $help_arg)) { - // Module has a help page. - $extra['help'] = theme('more_help_link', url("admin/help/$filename")); - } + // Generate link for module's help topics, if there are any . + if (help_exists($filename)) { + // Module has help topics. + $extra['help'] = theme('help_link', $filename, NULL, t('Get help')); } // Mark dependents disabled so the user cannot remove required modules. $dependents = array(); @@ -744,7 +737,7 @@ function _system_modules_build_row($info, $extra) { $form['description']['#markup'] .= theme('system_modules_incompatible', $status_long); } - // Show a "more help" link for modules that have them. + // Show a help link for modules that have them. if ($extra['help']) { $form['help'] = array( '#markup' => $extra['help'], diff --git a/modules/aggregator/help/about.html b/modules/aggregator/help/about.html new file mode 100644 index 0000000..fba909c --- /dev/null +++ b/modules/aggregator/help/about.html @@ -0,0 +1,4 @@ + +

The aggregator is a powerful on-site syndicator and news reader that gathers fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include RSS, RDF, and Atom.

+

Feeds contain feed items, or individual posts published by the site providing the feed. Feeds may be grouped in categories, generally by topic. Users view feed items in the main aggregator display or by their source. Administrators can add, edit and delete feeds and choose how often to check each feed for newly updated items. The most recent items in either a feed or category can be displayed as a block through the blocks administration page. A machine-readable OPML file of all feeds is available. A correctly configured cron maintenance task is required to update feeds automatically.

+

For more information, see the online handbook entry for Aggregator module.

diff --git a/modules/aggregator/help/aggregator.help b/modules/aggregator/help/aggregator.help new file mode 100644 index 0000000..345a5ff --- /dev/null +++ b/modules/aggregator/help/aggregator.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Aggregator +file = about +weight = -10 \ No newline at end of file diff --git a/modules/block/help/about.html b/modules/block/help/about.html new file mode 100644 index 0000000..c98a5b4 --- /dev/null +++ b/modules/block/help/about.html @@ -0,0 +1,15 @@ + +

Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Garland, for example, implements the regions "left sidebar", "right sidebar", "content", "header", and "footer", and a block may appear in any one of these areas. The blocks administration page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.

+

Although blocks are usually generated automatically by modules (like the User login block, for example), administrators can also define custom blocks. Custom blocks have a title, description, and body. The body of the block can be as long as necessary, and can contain content supported by any available input format.

+

When working with blocks, remember that:

+ +

For more information, see the online handbook entry for Block module.

diff --git a/modules/block/help/block.help b/modules/block/help/block.help new file mode 100644 index 0000000..7dac4aa --- /dev/null +++ b/modules/block/help/block.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Block +file = about +weight = -10 \ No newline at end of file diff --git a/modules/blog/help/about.html b/modules/blog/help/about.html new file mode 100644 index 0000000..0b8d3fd --- /dev/null +++ b/modules/blog/help/about.html @@ -0,0 +1,6 @@ + +

The blog module allows registered users to maintain an online journal, or blog. Blogs are made up of individual blog entries, and the blog entries are most often displayed in descending order by creation time.

+

There is an (optional) Blogs menu item added to the Navigation menu, which displays all blogs available on your site, and a My blog item displaying the current user's blog entries. The Blog entry menu item under Create content allows new blog entries to be created.

+

Each blog entry is displayed with an automatic link to other blogs created by the same user. By default, blog entries have comments enabled and are automatically promoted to the site front page. The blog module also creates a Recent blog posts block that may be enabled at the blocks administration page.

+

When using the aggregator module an automatic blog it icon is displayed next to the items in a feed's latest items block. Clicking this icon populates a blog entry with a title (the title of the feed item) and body (a link to the source item on its original site and illustrative content suitable for use in a block quote). Blog authors can use this feature to easily comment on items of interest that appear in aggregator feeds from other sites. To use this feature, be sure to enable the aggregator module, add and configure a feed from another site, and position the feed's latest items block.

+

For more information, see the online handbook entry for Blog module.

diff --git a/modules/blog/help/blog.help b/modules/blog/help/blog.help new file mode 100644 index 0000000..29d2710 --- /dev/null +++ b/modules/blog/help/blog.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Blog +file = about +weight = -10 \ No newline at end of file diff --git a/modules/blogapi/help/about.html b/modules/blogapi/help/about.html new file mode 100644 index 0000000..f7ac4f9 --- /dev/null +++ b/modules/blogapi/help/about.html @@ -0,0 +1,5 @@ + +

The Blog API module allows your site's users to access and post to their blogs from external blogging clients. External blogging clients are available for a wide range of desktop operating systems, and generally provide a feature-rich graphical environment for creating and editing posts.

+

Ecto, a blogging client available for both Mac OS X and Microsoft Windows, can be used with Blog API. Blog API also supports Blogger API, MetaWeblog API, and most of the Movable Type API. Blogging clients and other services (e.g. Flickr's "post to blog") that support these APIs may also be compatible.

+

Select the content types available to external clients on the Blog API settings page. If supported and available, each content type will be displayed as a separate "blog" by the external client.

+

For more information, see the online handbook entry for Blog API module.

diff --git a/modules/blogapi/help/blogapi.help b/modules/blogapi/help/blogapi.help new file mode 100644 index 0000000..9d848c4 --- /dev/null +++ b/modules/blogapi/help/blogapi.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Blog API +file = about +weight = -10 \ No newline at end of file diff --git a/modules/book/help/about.html b/modules/book/help/about.html new file mode 100644 index 0000000..2787caf --- /dev/null +++ b/modules/book/help/about.html @@ -0,0 +1,7 @@ + +

The book module is suited for creating structured, multi-page hypertexts such as site resource guides, manuals, and Frequently Asked Questions (FAQs). It permits a document to have chapters, sections, subsections, etc. Authors with suitable permissions can add pages to a collaborative book, placing them into the existing document by adding them to a table of contents menu.

+

Pages in the book hierarchy have navigation elements at the bottom of the page for moving through the text. These links lead to the previous and next pages in the book, and to the level above the current page in the book's structure. More comprehensive navigation may be provided by enabling the book navigation block on the blocks administration page.

+

Users can select the printer-friendly version link visible at the bottom of a book page to generate a printer-friendly display of the page and all of its subsections.

+

Users with the administer book outlines permission can add a post of any content type to a book, by selecting the appropriate book while editing the post or by using the interface available on the post's outline tab.

+

Administrators can view a list of all books on the book administration page. The Outline page for each book allows section titles to be edited or rearranged.

+

For more information, see the online handbook entry for Book module.

diff --git a/modules/book/help/book.help b/modules/book/help/book.help new file mode 100644 index 0000000..9175525 --- /dev/null +++ b/modules/book/help/book.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Book +file = about +weight = -10 \ No newline at end of file diff --git a/modules/color/help/about.html b/modules/color/help/about.html new file mode 100644 index 0000000..ffd5d80 --- /dev/null +++ b/modules/color/help/about.html @@ -0,0 +1,5 @@ + +

The color module allows a site administrator to quickly and easily change the color scheme of certain themes. Although not all themes support color module, both Garland (the default theme) and Minnelli were designed to take advantage of its features. By using color module with a compatible theme, you can easily change the color of links, backgrounds, text, and other theme elements. Color module requires that your file download method be set to public.

+

It is important to remember that color module saves a modified copy of the theme's specified stylesheets in the files directory. This means that if you make any manual changes to your theme's stylesheet, you must save your color settings again, even if they haven't changed. This causes the color module generated version of the stylesheets in the files directory to be recreated using the new version of the original file.

+

To change the color settings for a compatible theme, select the "configure" link for the theme on the themes administration page.

+

For more information, see the online handbook entry for Color module.

diff --git a/modules/color/help/color.help b/modules/color/help/color.help new file mode 100644 index 0000000..0f9cb97 --- /dev/null +++ b/modules/color/help/color.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Color +file = about +weight = -10 \ No newline at end of file diff --git a/modules/comment/help/about.html b/modules/comment/help/about.html new file mode 100644 index 0000000..08f9cef --- /dev/null +++ b/modules/comment/help/about.html @@ -0,0 +1,4 @@ + +

The comment module allows visitors to comment on your posts, creating ad hoc discussion boards. Any content type may have its Default comment setting set to Read/Write to allow comments, or Disabled, to prevent comments. Comment display settings and other controls may also be customized for each content type (some display settings are customizable by individual users).

+

Comment permissions are assigned to user roles, and are used to determine whether anonymous users (or other roles) are allowed to comment on posts. If anonymous users are allowed to comment, their individual contact information may be retained in cookies stored on their local computer for use in later comment submissions. When a comment has no replies, it may be (optionally) edited by its author. The comment module uses the same input formats and HTML tags available when creating other forms of content.

+

For more information, see the online handbook entry for Comment module.

diff --git a/modules/comment/help/comment.help b/modules/comment/help/comment.help new file mode 100644 index 0000000..2cd6912 --- /dev/null +++ b/modules/comment/help/comment.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Comment +file = about +weight = -10 \ No newline at end of file diff --git a/modules/contact/help/about.html b/modules/contact/help/about.html new file mode 100644 index 0000000..648eda2 --- /dev/null +++ b/modules/contact/help/about.html @@ -0,0 +1,7 @@ + +

The contact module facilitates communication via e-mail, by allowing your site's visitors to contact one another (personal contact forms), and by providing a simple way to direct messages to a set of administrator-defined recipients (the contact page). With either form, users specify a subject, write their message, and (optionally) have a copy of their message sent to their own e-mail address.

+

Personal contact forms allow users to be contacted via e-mail, while keeping recipient e-mail addresses private. Users may enable or disable their personal contact forms by editing their My account page. If enabled, a Contact tab leading to their personal contact form is available on their user profile. Site administrators have access to all personal contact forms (even if they have been disabled). The Contact tab is only visible when viewing another user's profile (users do not see their own Contact tab).

+

The contact page provides a simple form for visitors to leave comments, feedback, or other requests. Messages are routed by selecting a category from a list of administrator-defined options; each category has its own set of e-mail recipients. Common categories for a business site include, for example, "Website feedback" (messages are forwarded to web site administrators) and "Product information" (messages are forwarded to members of the sales department). The actual e-mail addresses defined within a category are not displayed. Only users in roles with the access site-wide contact form permission may access the contact page.

+

A link to your site's contact page from the main Navigation menu is created, but is disabled by default. Create a similar link on another menu by adding a menu item pointing to the path "contact"

+

Customize the contact page with additional information (like physical location, mailing address, and telephone number) using the contact form settings page. The settings page also provides configuration options for the maximum number of contact form submissions a user may perform per hour, and the default status of users' personal contact forms.

+

For more information, see the online handbook entry for Contact module.

diff --git a/modules/contact/help/contact.help b/modules/contact/help/contact.help new file mode 100644 index 0000000..5b5ac58 --- /dev/null +++ b/modules/contact/help/contact.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Contact +file = about +weight = -10 \ No newline at end of file diff --git a/modules/dblog/help/about.html b/modules/dblog/help/about.html new file mode 100644 index 0000000..e0c8cfe --- /dev/null +++ b/modules/dblog/help/about.html @@ -0,0 +1,4 @@ + +

The dblog module monitors your system, capturing system events in a log to be reviewed by an authorized individual at a later time. This is useful for site administrators who want a quick overview of activities on their site. The logs also record the sequence of events, so it can be useful for debugging site errors.

+

The dblog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the dblog report on a regular basis to ensure their site is working properly.

+

For more information, see the online handbook entry for Dblog module.

diff --git a/modules/dblog/help/dblog.help b/modules/dblog/help/dblog.help new file mode 100644 index 0000000..52b374f --- /dev/null +++ b/modules/dblog/help/dblog.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About DbLog +file = about +weight = -10 \ No newline at end of file diff --git a/modules/field/help/about.html b/modules/field/help/about.html new file mode 100644 index 0000000..9f967df --- /dev/null +++ b/modules/field/help/about.html @@ -0,0 +1,3 @@ + +

The Field API allows custom data fields to be attached to Drupal objects and takes care of storing, loading, editing, and rendering field data. Any object type (node, user, etc.) can use the Field API to make itself "fieldable" and thus allow fields to be attached to it.

+

The Field API provides no user interface on its own. Use the Content Construction Kit (CCK) contributed module to manage custom fields via a web browser.

diff --git a/modules/field/help/field.help b/modules/field/help/field.help new file mode 100644 index 0000000..0f9cb97 --- /dev/null +++ b/modules/field/help/field.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Color +file = about +weight = -10 \ No newline at end of file diff --git a/modules/filter/help/about.html b/modules/filter/help/about.html new file mode 100644 index 0000000..7cdcee7 --- /dev/null +++ b/modules/filter/help/about.html @@ -0,0 +1,5 @@ + +

The filter module allows administrators to configure text input formats for use on your site. An input format defines the HTML tags, codes, and other input allowed in both content and comments, and is a key feature in guarding against potentially damaging input from malicious users. Two input formats included by default are Filtered HTML (which allows only an administrator-approved subset of HTML tags) and Full HTML (which allows the full set of HTML tags). Additional input formats may be created by an administrator.

+

Each input format uses filters to manipulate text, and most input formats apply several different filters to text in a specific order. Each filter is designed for a specific purpose, and generally either adds, removes or transforms elements within user-entered text before it is displayed. A filter does not change the actual content of a post, but instead, modifies it temporarily before it is displayed. A filter may remove unapproved HTML tags, for instance, while another automatically adds HTML to make links referenced in text clickable.

+

Users with access to more than one input format can use the Input format fieldset to choose between available input formats when creating or editing multi-line content. Administrators determine the input formats available to each user role, select a default input format, and control the order of formats listed in the Input format fieldset.

+

For more information, see the online handbook entry for Filter module.

diff --git a/modules/filter/help/filter.help b/modules/filter/help/filter.help new file mode 100644 index 0000000..0734fdb --- /dev/null +++ b/modules/filter/help/filter.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Filter +file = about +weight = -10 \ No newline at end of file diff --git a/modules/forum/help/about.html b/modules/forum/help/about.html new file mode 100644 index 0000000..ff9bbc2 --- /dev/null +++ b/modules/forum/help/about.html @@ -0,0 +1,11 @@ + +

The forum module lets you create threaded discussion forums with functionality similar to other message board systems. Forums are useful because they allow community members to discuss topics with one another while ensuring those conversations are archived for later reference. The forum topic menu item (under Create content on the Navigation menu) creates the initial post of a new threaded discussion, or thread.

+

A threaded discussion occurs as people leave comments on a forum topic (or on other comments within that topic). A forum topic is contained within a forum, which may hold many similar or related forum topics. Forums are (optionally) nested within a container, which may hold many similar or related forums. Both containers and forums may be nested within other containers and forums, and provide structure for your message board. By carefully planning this structure, you make it easier for users to find and comment on a specific forum topic.

+

When administering a forum, note that:

+ +

For more information, see the online handbook entry for Forum module.

diff --git a/modules/forum/help/forum.help b/modules/forum/help/forum.help new file mode 100644 index 0000000..452c39b --- /dev/null +++ b/modules/forum/help/forum.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Forum +file = about +weight = -10 \ No newline at end of file diff --git a/modules/help/help/about.html b/modules/help/help/about.html new file mode 100644 index 0000000..0c1039d --- /dev/null +++ b/modules/help/help/about.html @@ -0,0 +1,40 @@ + +The help system was designed to replace the original Drupal help system, which has several flaws that make it hard to create new help, hard to maintain existing help, and particularly hard to access help. + +The primary goal, then, is to increase the accessibility of help, meaning the ability of both the user and the help text author to access the needed tools to use, create, maintain and translate the help. + +This system is completely separate from Drupal's hook_help(). In Drupal 6, it actually co-exists with it; in the future, it is hoped that it will completely replace it allowing hook_help() to be deprecated and removed. + +Messages added to the top of a page are not really "help". Often these messages are an introduction to a form or a short blurb telling a user what to do with a particular page. The problem is, these messages are always there, they are easily ignored, and they come before the actual page. In general, when users are learning, they want to see the page first, then ask questions. The reverse order is much less conducive to actually teaching a user how to use something. By allowing help to be available on request, the system conforms more naturally to how most people work. + +

Help is organized by topic

+With the hook_help() method, help text is organized by URL path. This is fine if you have help text describing how to use a particular page or what a particular page does, but ultimately is limiting because manuals and documentation are usually grouped by topic, and those topics are determined by the material itself. + +Help allows the documentation author to organize topics as he or she sees fit; the only restriction, really, is that each individual chunk of text needs to stand on its own as a discrete topic. + +What's more, modules can insert their topics into another module's hierarchy. This would allow the Drupal core to create a task based help navigation system which allows modules insert topics into that navigation fluidly. This allows modules to continue to keep their systems separate, yet integrate into the main system. + +

Help topics are processed HTML in their own files

+This separation makes it easy to find and modify. Currently, everything is lumped together in hook_help() in PHP strings that are run through t(), and there is a fair amount of PHP code necessary in this system that actually gets in the way of writing good, explanatory text. + +In fact, requiring a documentation author to understand PHP at all is a detriment. The idea that documentation writers need to have PHP development as a skill seriously reduces the number of available contributors. HTML, on the other hand, is a much more common skill, is relatively easy to learn, and the amount of HTML needed to write documentation is only a little bit more than the HTML used in forum posts. + +Another benefit to not using PHP is that the files themselves are safe. They are unlikely to include malicious PHP code that could take over the server or do worse things. This means that these files can be used relatively easily on the drupal.org hardware so that a module's help files can be made immediately available without needing to download the module. It also means that descriptions of the module can be made on drupal.org that are version aware, can be corrected easily in CVS with patches, but can also be made available with the module so that drupal.org is not required. + +This also means that we could, if we wanted, package the drupal.org handbooks, or a subset of them, directly into a drupal distribution, or a drupal add-on, so that Drupal administrators can have Drupal help without needing to visit drupal.org. This can be valuable in locked down corporate environments and on planes. But more importantly, the handbooks can be made version aware much more easily than the current method on drupal.org. + +The downside to this method is that these books can't easily be made dynamic. Though the use of alter hooks could allow a module to make modifications to the help as needed, doing this could make the help files less useful when you take them out of context. + +

Help files are translated as a file

+It is actually not easy to translate documents as strings, particularly when the language being used is very much unlike English. In fact, when translating a document, the organization of the sentences may change drastically. It is also a burden on the CPU to do this, as you are indexing on very long strings. + +Translators have a much better time translating a document as a unit, because of the presence of the entire context. + +

Help has its own navigation system

+By making use of a navigation system specified in a .ini file (which is not PHP code and therefore safe to use on *.drupal.org sites), the help can be structured like a book, which is typical of online manuals. This is familiar to users, can be organized (and re-organized) and allows a module to include significantly richer text without burdening the PHP code with having its help loaded unnecessarily. + +This book can be navigated hierarchically as well, making it easy to keep related topics together. +

Help is indexed by the search engine

+An important goal of this system was to add searchability to the help. By being able to enter keywords into the search box and find relevant topics, we come up with a system that resembles the kind of help that comes with many operating systems. This is very valuable when searching through manuals trying to find out how to do a particular thing. + +This search is specific to the help, meaning that the help will not be mixed in with the global node search. This can be considered both an advantage and a disadvantage. For the most part, this help system is meant to provide help to site administrators, and content searches should not find it. The disadvantage, of course, is when you want to use it for end user help, you will not be able to. diff --git a/modules/help/help/creating-help.html b/modules/help/help/creating-help.html new file mode 100644 index 0000000..4193dcb --- /dev/null +++ b/modules/help/help/creating-help.html @@ -0,0 +1,43 @@ + +

The Help system is a pluggable system that provides help facilities for Drupal and its modules. Although the help does not provide general help by itself, it provides a powerful and easy framework that modules may use to provide their own help. +

+ +

+Modules utilizing Help should create a 'help' subdirectory inside their +module's directory. Place the file MODULENAME.help in this subdirectory, formatted +similar to the following example: +

+
+[buses]
+title = "How buses are tied into the system"
+file = buses
+
+[TOPIC_ID]
+title = "Title of topic".
+file = filename of topic, without the .html extension.
+weight = How important the topic is on the index page.
+parent = The optional topic parent to use in the breadcrumb,
+         either topic or module%topic.
+
+ +

+All topics are addressed by the module providing the topic, and by the topic +id. To embed links, use the following format: +

+ +$output .= theme('help_topic', $module, $topic); + + +

Inside your help file, link to other topics using the format <a href="[topic:module/topic]">. This +format will ensure that topic view type status remains consistent when switching between links.

+ +

Use <img src="[path]example.jpg" /> to reference items +within the help directory, such as images you wish to embed within the help text.

+ +

Use <a href="[base_url]admin/settings/site-configuration" target="_blank"> to reference any normal path in the site.

+ +

If the search module is enabled, the contents of help system will be indexed on cron. If you enable new modules and wish to immediately index its help text, visit the "Administration -> Reports -> Status report" and click the "Run cron manually" link.

+ +

Example: Don't click this!

+ +

See: Help file format

diff --git a/modules/help/help/help-file.html b/modules/help/help/help-file.html new file mode 100644 index 0000000..c478e6f --- /dev/null +++ b/modules/help/help/help-file.html @@ -0,0 +1,50 @@ + +The help configuration file is in simple .ini file format, divided into sections for each help file, plus an optional section for global settings that might be inherited for each help file. + +The first line of an help ini file should be ;$Id $ which will be a comment providing the CVS identifier for the file. The ; indicates a comment character. Anything after the ; will be ignored. + +Global settings may be put into a section named [help settings] -- this means that this name is reserved and it cannot be a help file in any module. The following settings may be set in this section: +
+
line break
+
If set to any value, the line break filter will be applied to all help files defined by this module, unless that help file specifically is set otherwise. By default, the line break filter is not applied; however, help files can be much easier to write with the line break filter on.
+
navigation
+
If set to true, the navigation will be displayed at the end of the help topic: previous topic, next topic, and child topics.
+
css
+
Specify a css file that will be used for all help files (unless overridden), including the .css extension. This .css file must reside in the help directory along with the .html files, and will not be affected by translation.
+
name
+
May be set to override the module name as displayed in both the module index as well as the navigation and breadcrumb trail. In general this does not need to be set, but a few modules may want to use a more friendly name than appears in the .info file.
+
index name
+
This may be set to change the name of the module in the module index. It overrides the 'name' setting above, as well as the module name in its .info file.
+
hide
+
This may be used to hide a module in the module index. This is particularly useful for modules who insert their help files into the hierarchy of another module, as might be done by modules that extend Views or CCK. By setting "hide = TRUE" the module will not appear as its own entry.
+
+ +Each section after that will correspond to a single help file, and each one may have the following settings: +
+
title
+
The title of the topic, presented to the user and used in links. If you have special characters in your title, be sure to enclose it in quotes.
+
file
+
The filename, without the .html extension, used for the topic. This is optional; if not specified, the topic name wil be the file name.
+
weight
+
The weight, used for sorting topics on the administration page. Defaults to 0 if unspecified. Items with the same weight are listed in the same order as they listed in the .help file.
+
parent
+
The topic ID to use in a hierarchy; children will be listed beneath parents in the topic list, and will have the parent in their breadcrumb trail. You may parent this topic to another module's topic by using module%topic as the identifier. For example, 'views%display' will make this a child of the 'display' topic in the 'views' module.
+
line break
+
If set to true, linebreaks will be converted into br and p tags automatically. If unspecified, will default to off. Set to 0 to disable the filter if this has been turned on in the global settings.
+
css
+
Specify a css file that will be used for this file. This .css file must reside in the help directory along with the .html files. This will override any .css file added by the global system.
+
+ +For example, here is a version of the help.help file: +
+[using-help]
+title = "Using help"
+weight = -10
+
+[translation]
+title = Translating help
+
+[help-file]
+title = Help file format
+line break = TRUE
+
\ No newline at end of file diff --git a/modules/help/help/help.help b/modules/help/help/help.help new file mode 100644 index 0000000..47a5cae --- /dev/null +++ b/modules/help/help/help.help @@ -0,0 +1,15 @@ +; $Id$ + +[about] +title = About Help +line break = TRUE + +[creating-help] +title = Creating help + +[translation] +title = Translating help + +[help-file] +title = Help file format +line break = TRUE \ No newline at end of file diff --git a/modules/help/help/translation.html b/modules/help/help/translation.html new file mode 100644 index 0000000..9f22254 --- /dev/null +++ b/modules/help/help/translation.html @@ -0,0 +1,10 @@ + +

To translate help, first create a translations/help/$language directory +in the module directory. Then, copy the .ini file and all .html files from +the help directory.

+ +

The .ini file only needs to keep the titles, and if there is a 'name' or 'index name' setting in the 'help settings' portion, that should be retained. Any retained settings should be translated. The rest of the data in the .ini file may be discarded or ignored.

+ +

Each file should then be translated in place.

+ +

When translating a .html file, you will find that the path keyword will lead to the original directory. If you must translate items that are linked, such as images, use trans_path instead, which will lead to the translated directory. This will allow you to pick and choose which linked items, if any, will be translated.

\ No newline at end of file diff --git a/modules/locale/help/about.html b/modules/locale/help/about.html new file mode 100644 index 0000000..1a2f036 --- /dev/null +++ b/modules/locale/help/about.html @@ -0,0 +1,10 @@ + +

The locale module allows your Drupal site to be presented in languages other than the default English, a defining feature of multi-lingual websites. The locale module works by examining text as it is about to be displayed: when a translation of the text is available in the language to be displayed, the translation is displayed rather than the original text. When a translation is unavailable, the original text is displayed, and then stored for later review by a translator.

+

Beyond translation of the Drupal interface, the locale module provides a feature set tailored to the needs of a multi-lingual site. Language negotiation allows your site to automatically change language based on the domain or path used for each request. Users may (optionally) select their preferred language on their My account page, and your site can be configured to honor a web browser's preferred language settings. Your site content can be created in (and translated to) any enabled language, and each post may have a language-appropriate alias for each of its translations. The locale module works in concert with the content translation module to manage translated content.

+

Translations may be provided by:

+ +

If an existing translation package does not meet your needs, the Gettext Portable Object (.po) files within a package may be modified, or new .po files may be created, using a desktop Gettext editor. The locale module's import feature allows the translated strings from a new or modified .po file to be added to your site. The locale module's export feature generates files from your site's translated strings, that can either be shared with others or edited offline by a Gettext translation editor.

+

For more information, see the online handbook entry for Locale module.

diff --git a/modules/locale/help/locale.help b/modules/locale/help/locale.help new file mode 100644 index 0000000..46af828 --- /dev/null +++ b/modules/locale/help/locale.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Locale +file = about +weight = -10 \ No newline at end of file diff --git a/modules/menu/help/about.html b/modules/menu/help/about.html new file mode 100644 index 0000000..55c7476 --- /dev/null +++ b/modules/menu/help/about.html @@ -0,0 +1,4 @@ + +

The menu module provides an interface to control and customize Drupal's powerful menu system. Menus are a hierarchical collection of links, or menu items, used to navigate a website, and are positioned and displayed using Drupal's flexible block system. By default, three menus are created during installation: Navigation, Primary links, and Secondary links. The Navigation menu contains most links necessary for working with and navigating your site, and is often displayed in either the left or right sidebar. Most Drupal themes also provide support for Primary links and Secondary links, by displaying them in either the header or footer of each page. By default, Primary links and Secondary links contain no menu items but may be configured to contain custom menu items specific to your site.

+

The menus page displays all menus currently available on your site. Select a menu from this list to add or edit a menu item, or to rearrange items within the menu. Create new menus using the add menu page (the block containing a new menu must also be enabled on the blocks administration page).

+

For more information, see the online handbook entry for Menu module.

diff --git a/modules/menu/help/menu.help b/modules/menu/help/menu.help new file mode 100644 index 0000000..17ff461 --- /dev/null +++ b/modules/menu/help/menu.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Menu +file = about +weight = -10 \ No newline at end of file diff --git a/modules/node/help/about.html b/modules/node/help/about.html new file mode 100644 index 0000000..b766561 --- /dev/null +++ b/modules/node/help/about.html @@ -0,0 +1,5 @@ + +

The node module manages content on your site, and stores all posts (regardless of type) as a "node" . In addition to basic publishing settings, including whether the post has been published, promoted to the site front page, or should remain present (or sticky) at the top of lists, the node module also records basic information about the author of a post. Optional revision control over edits is available. For additional functionality, the node module is often extended by other modules.

+

Though each post on your site is a node, each post is also of a particular content type. Content types are used to define the characteristics of a post, including the title and description of the fields displayed on its add and edit pages. Each content type may have different default settings for Publishing options and other workflow controls. By default, the two content types in a standard Drupal installation are Page and Story. Use the content types page to add new or edit existing content types. Additional content types also become available as you enable additional core, contributed and custom modules.

+

The administrative content page allows you to review and manage your site content. The post settings page sets certain options for the display of posts. The node module makes a number of permissions available for each content type, which may be set by role on the permissions page.

+

For more information, see the online handbook entry for Node module.

diff --git a/modules/node/help/node.help b/modules/node/help/node.help new file mode 100644 index 0000000..f641c4e --- /dev/null +++ b/modules/node/help/node.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Node +file = about +weight = -10 \ No newline at end of file diff --git a/modules/openid/help/about.html b/modules/openid/help/about.html new file mode 100644 index 0000000..7d2c632 --- /dev/null +++ b/modules/openid/help/about.html @@ -0,0 +1,6 @@ + +

OpenID is a secure method for logging into many websites with a single username and password. It does not require special software, and it does not share passwords with any site to which it is associated; including your site.

+

Users can create accounts using their OpenID, assign one or more OpenIDs to an existing account, and log in using an OpenID. This lowers the barrier to registration, which is good for the site, and offers convenience and security to the users. OpenID is not a trust system, so email verification is still necessary. The benefit stems from the fact that users can have a single password that they can use on many websites. This means they can easily update their single password from a centralized location, rather than having to change dozens of passwords individually.

+

The basic concept is as follows: A user has an account on an OpenID server. This account provides them with a unique URL (such as myusername.openidprovider.com). When the user comes to your site, they are presented with the option of entering this URL. Your site then communicates with the OpenID server, asking it to verify the identity of the user. If the user is logged into their OpenID server, the server communicates back to your site, verifying the user. If they are not logged in, the OpenID server will ask the user for their password. At no point does your site record, or need to record the user's password.

+

More information on OpenID is available at OpenID.net.

+

For more information, see the online handbook entry for OpenID module.

diff --git a/modules/openid/help/openid.help b/modules/openid/help/openid.help new file mode 100644 index 0000000..0c9414e --- /dev/null +++ b/modules/openid/help/openid.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About OpenID +file = about +weight = -10 \ No newline at end of file diff --git a/modules/path/help/about.html b/modules/path/help/about.html new file mode 100644 index 0000000..ea9363d --- /dev/null +++ b/modules/path/help/about.html @@ -0,0 +1,11 @@ + +

The path module allows you to specify aliases for Drupal URLs. Such aliases improve readability of URLs for your users and may help internet search engines to index your content more effectively. More than one alias may be created for a given page.

+

Some examples of URL aliases are:

+ +

The path module enables appropriately permissioned users to specify an optional alias in all node input and editing forms, and provides an interface to view and edit all URL aliases. The two permissions related to URL aliasing are administer url aliases and create url aliases.

+

This module also provides user-defined mass URL aliasing capabilities, which is useful if you wish to uniformly use URLs different from the default. For example, you may want to have your URLs presented in a different language. Access to the Drupal source code on the web server is required to set up mass URL aliasing.

+

For more information, see the online handbook entry for Path module.

diff --git a/modules/path/help/path.help b/modules/path/help/path.help new file mode 100644 index 0000000..45503a3 --- /dev/null +++ b/modules/path/help/path.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Path +file = about +weight = -10 \ No newline at end of file diff --git a/modules/poll/help/about.html b/modules/poll/help/about.html new file mode 100644 index 0000000..fce5d7a --- /dev/null +++ b/modules/poll/help/about.html @@ -0,0 +1,4 @@ + +

The poll module can be used to create simple polls for site users. A poll is a simple, multiple choice questionnaire which displays the cumulative results of the answers to the poll. Having polls on the site is a good way to receive feedback from community members.

+

When creating a poll, enter the question being posed, as well as the potential choices (and beginning vote counts for each choice). The status and duration (length of time the poll remains active for new votes) can also be specified. Use the poll menu item to view all current polls. To vote in or view the results of a specific poll, click on the poll itself.

+

For more information, see the online handbook entry for Poll module.

diff --git a/modules/poll/help/poll.help b/modules/poll/help/poll.help new file mode 100644 index 0000000..1d0f664 --- /dev/null +++ b/modules/poll/help/poll.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Poll +file = about +weight = -10 \ No newline at end of file diff --git a/modules/profile/help/about.html b/modules/profile/help/about.html new file mode 100644 index 0000000..2b0c23f --- /dev/null +++ b/modules/profile/help/about.html @@ -0,0 +1,13 @@ + +

The profile module allows custom fields (such as country, full name, or age) to be defined and displayed in the My Account section. This permits users of a site to share more information about themselves, and can help community-based sites organize users around specific information.

+

The following types of fields can be added to a user profile:

+ +

For more information, see the online handbook entry for Profile module.

diff --git a/modules/profile/help/profile.help b/modules/profile/help/profile.help new file mode 100644 index 0000000..fd5a203 --- /dev/null +++ b/modules/profile/help/profile.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Profile +file = about +weight = -10 \ No newline at end of file diff --git a/modules/search/help/about.html b/modules/search/help/about.html new file mode 100644 index 0000000..bfe1082 --- /dev/null +++ b/modules/search/help/about.html @@ -0,0 +1,4 @@ + +

The search module adds the ability to search for content by keywords. Search is often the only practical way to find content on a large site, and is useful for finding both users and posts.

+

To provide keyword searching, the search engine maintains an index of words found in your site's content. To build and maintain this index, a correctly configured cron maintenance task is required. Indexing behavior can be adjusted using the search settings page; for example, the Number of items to index per cron run sets the maximum number of items indexed in each pass of a cron maintenance task. If necessary, reduce this number to prevent timeouts and memory errors when indexing.

+

For more information, see the online handbook entry for Search module.

diff --git a/modules/search/help/search.help b/modules/search/help/search.help new file mode 100644 index 0000000..063bc72 --- /dev/null +++ b/modules/search/help/search.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Search +file = about +weight = -10 \ No newline at end of file diff --git a/modules/simpletest/help/about.html b/modules/simpletest/help/about.html new file mode 100644 index 0000000..23e1c7d --- /dev/null +++ b/modules/simpletest/help/about.html @@ -0,0 +1,6 @@ + +

The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules.

+

Visit Administer >> Site building >> SimpleTest to display a list of available tests. For comprehensive testing, select all tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)

+

After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.

+

For more information on creating and modifying your own tests, see the SimpleTest API Documentation in the Drupal handbook.

+

For more information, see the online handbook entry for SimpleTest module.

diff --git a/modules/simpletest/help/simpletest.help b/modules/simpletest/help/simpletest.help new file mode 100644 index 0000000..9a67d78 --- /dev/null +++ b/modules/simpletest/help/simpletest.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Simpletest +file = about +weight = -10 \ No newline at end of file diff --git a/modules/statistics/help/about.html b/modules/statistics/help/about.html new file mode 100644 index 0000000..9f60278 --- /dev/null +++ b/modules/statistics/help/about.html @@ -0,0 +1,18 @@ + +

The statistics module keeps track of numerous site usage statistics, including the number of times, and from where, each of your posts is viewed. These statistics are useful in determining how users are interacting with each other and with your site, and are required for the display of some Drupal blocks.

+

The statistics module provides:

+ +

Configuring the statistics module

+ +

For more information, see the online handbook entry for Statistics module.

diff --git a/modules/statistics/help/statistics.help b/modules/statistics/help/statistics.help new file mode 100644 index 0000000..14693d5 --- /dev/null +++ b/modules/statistics/help/statistics.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Statistics +file = about +weight = -10 \ No newline at end of file diff --git a/modules/syslog/help/about.html b/modules/syslog/help/about.html new file mode 100644 index 0000000..d248d5c --- /dev/null +++ b/modules/syslog/help/about.html @@ -0,0 +1,4 @@ + +

The syslog module enables Drupal to send messages to the operating system's logging facility.

+

Syslog is an operating system administrative logging tool, and provides valuable information for use in system management and security auditing. Most suited to medium and large sites, syslog provides filtering tools that allow messages to be routed by type and severity. On UNIX/Linux systems, the file /etc/syslog.conf defines this routing configuration; on Microsoft Windows, all messages are sent to the Event Log. For more information on syslog facilities, severity levels, and how to set up a syslog.conf file, see UNIX/Linux syslog.conf and PHP's openlog and syslog functions.

+

For more information, see the online handbook entry for Syslog module.

diff --git a/modules/syslog/help/syslog.help b/modules/syslog/help/syslog.help new file mode 100644 index 0000000..6321e8d --- /dev/null +++ b/modules/syslog/help/syslog.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Syslog +file = about +weight = -10 \ No newline at end of file diff --git a/modules/system/help/about.html b/modules/system/help/about.html new file mode 100644 index 0000000..f9dd8ce --- /dev/null +++ b/modules/system/help/about.html @@ -0,0 +1,11 @@ + +

The system module is at the foundation of your Drupal website, and provides basic but extensible functionality for use by other modules and themes. Some integral elements of Drupal are contained in and managed by the system module, including caching, enabling or disabling of modules and themes, preparing and displaying the administrative page, and configuring fundamental site settings. A number of key system maintenance operations are also part of the system module.

+

The system module provides:

+ +

For more information, see the online handbook entry for System module.

diff --git a/modules/system/help/system.help b/modules/system/help/system.help new file mode 100644 index 0000000..dc64e94 --- /dev/null +++ b/modules/system/help/system.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About System +file = about +weight = -10 \ No newline at end of file diff --git a/modules/taxonomy/help/about.html b/modules/taxonomy/help/about.html new file mode 100644 index 0000000..1d1db83 --- /dev/null +++ b/modules/taxonomy/help/about.html @@ -0,0 +1,9 @@ + +

The taxonomy module allows you to categorize content using various systems of classification. Free-tagging vocabularies are created by users on the fly when they submit posts (as commonly found in blogs and social bookmarking applications). Controlled vocabularies allow for administrator-defined short lists of terms as well as complex hierarchies with multiple relationships between different terms. These methods can be applied to different content types and combined together to create a powerful and flexible method of classifying and presenting your content.

+

For example, when creating a recipe site, you might want to classify posts by both the type of meal and preparation time. A vocabulary for each allows you to categorize using each criteria independently instead of creating a tag for every possible combination.

+

Type of Meal: Appetizer, Main Course, Salad, Dessert

+

Preparation Time: 0-30mins, 30-60mins, 1-2 hrs, 2hrs+

+

Each taxonomy term (often called a 'category' or 'tag' in other systems) automatically provides lists of posts and a corresponding RSS feed. These taxonomy/term URLs can be manipulated to generate AND and OR lists of posts classified with terms. In our recipe site example, it then becomes easy to create pages displaying 'Main courses', '30 minute recipes', or '30 minute main courses and appetizers' by using terms on their own or in combination with others. There are a significant number of contributed modules which you to alter and extend the behavior of the core module for both display and organization of terms.

+

Terms can also be organized in parent/child relationships from the admin interface. An example would be a vocabulary grouping countries under their parent geo-political regions. The taxonomy module also enables advanced implementations of hierarchy, for example placing Turkey in both the 'Middle East' and 'Europe'.

+

The taxonomy module supports the use of both synonyms and related terms, but does not directly use this functionality. However, optional contributed or custom modules may make full use of these advanced features.

+

For more information, see the online handbook entry for Taxonomy module.

diff --git a/modules/taxonomy/help/taxonomy.help b/modules/taxonomy/help/taxonomy.help new file mode 100644 index 0000000..627e34d --- /dev/null +++ b/modules/taxonomy/help/taxonomy.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Taxonomy +file = about +weight = -10 \ No newline at end of file diff --git a/modules/tracker/help/about.html b/modules/tracker/help/about.html new file mode 100644 index 0000000..4e814fd --- /dev/null +++ b/modules/tracker/help/about.html @@ -0,0 +1,4 @@ + +

The tracker module displays the most recently added or updated content on your site, and provides user-level tracking to follow the contributions of particular authors.

+

The Recent posts page is available via a link in the navigation menu block and displays new and recently-updated content (including the content type, the title, the author's name, number of comments, and time of last update) in reverse chronological order. Posts are marked updated when changes occur in the text, or when new comments are added. To use the tracker module to follow a specific user's contributions, select the Track tab from the user's profile page.

+

For more information, see the online handbook entry for Tracker module.

diff --git a/modules/tracker/help/tracker.help b/modules/tracker/help/tracker.help new file mode 100644 index 0000000..9368ccc --- /dev/null +++ b/modules/tracker/help/tracker.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Tracker +file = about +weight = -10 \ No newline at end of file diff --git a/modules/translation/help/about.html b/modules/translation/help/about.html new file mode 100644 index 0000000..be42e34 --- /dev/null +++ b/modules/translation/help/about.html @@ -0,0 +1,17 @@ + +

The content translation module allows content to be translated into different languages. Working with the locale module (which manages enabled languages and provides translation for the site interface), the content translation module is key to creating and maintaining translated site content.

+

Configuring content translation and translation-enabled content types:

+ +

Working with translation-enabled content types:

+ +

Use the language switcher block provided by locale module to allow users to select a language. If available, both the site interface and site content are presented in the language selected.

+

For more information, see the online handbook entry for Translation module.

diff --git a/modules/translation/help/translation.help b/modules/translation/help/translation.help new file mode 100644 index 0000000..a58ee6e --- /dev/null +++ b/modules/translation/help/translation.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Translation +file = about +weight = -10 \ No newline at end of file diff --git a/modules/trigger/help/about.html b/modules/trigger/help/about.html new file mode 100644 index 0000000..0fa3b7c --- /dev/null +++ b/modules/trigger/help/about.html @@ -0,0 +1,4 @@ + +

The Trigger module provides the ability to trigger actions upon system events, such as when new content is added or when a user logs in.

+

The combination of actions and triggers can perform many useful tasks, such as e-mailing an administrator if a user account is deleted, or automatically unpublishing comments that contain certain words. By default, there are five "contexts" of events (Comments, Content, Cron, Taxonomy, and Users), but more may be added by additional modules.

+

For more information, see the online handbook entry for Trigger module.

diff --git a/modules/trigger/help/trigger.help b/modules/trigger/help/trigger.help new file mode 100644 index 0000000..eb0ccc5 --- /dev/null +++ b/modules/trigger/help/trigger.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Trigger +file = about +weight = -10 \ No newline at end of file diff --git a/modules/update/help/about.html b/modules/update/help/about.html new file mode 100644 index 0000000..2772b54 --- /dev/null +++ b/modules/update/help/about.html @@ -0,0 +1,5 @@ + +

The Update status module periodically checks for new versions of your site's software (including contributed modules and themes), and alerts you to available updates.

+

The report of available updates will alert you when new releases are available for download. You may configure options for update checking frequency and notifications at the Update status module settings page.

+

Please note that in order to provide this information, anonymous usage statistics are sent to drupal.org. If desired, you may disable the Update status module from the module administration page.

+

For more information, see the online handbook entry for Update status module.

diff --git a/modules/update/help/update.help b/modules/update/help/update.help new file mode 100644 index 0000000..03bc626 --- /dev/null +++ b/modules/update/help/update.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Update +file = about +weight = -10 \ No newline at end of file diff --git a/modules/upload/help/about.html b/modules/upload/help/about.html new file mode 100644 index 0000000..95d9416 --- /dev/null +++ b/modules/upload/help/about.html @@ -0,0 +1,4 @@ + +

The upload module allows users to upload files to the site. The ability to upload files is important for members of a community who want to share work. It is also useful to administrators who want to keep uploaded files connected to posts.

+

Users with the upload files permission can upload attachments to posts. Uploads may be enabled for specific content types on the content types settings page. Each user role can be customized to limit or control the file size of uploads, or the maximum dimension of image files.

+

For more information, see the online handbook entry for Upload module.

diff --git a/modules/upload/help/upload.help b/modules/upload/help/upload.help new file mode 100644 index 0000000..b239aba --- /dev/null +++ b/modules/upload/help/upload.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About Upload +file = about +weight = -10 \ No newline at end of file diff --git a/modules/user/help/about.html b/modules/user/help/about.html new file mode 100644 index 0000000..d3f27ed --- /dev/null +++ b/modules/user/help/about.html @@ -0,0 +1,5 @@ + +

The user module allows users to register, login, and log out. Users benefit from being able to sign on because it associates content they create with their account and allows various permissions to be set for their roles. The user module supports user roles which establish fine grained permissions allowing each role to do only what the administrator wants them to. Each user is assigned to one or more roles. By default there are two roles anonymous - a user who has not logged in, and authenticated a user who has signed up and who has been authorized.

+

Users can use their own name or handle and can specify personal configuration settings through their individual My account page. Users must authenticate by supplying a local username and password or through their OpenID, an optional and secure method for logging into many websites with a single username and password. In some configurations, users may authenticate using a username and password from another Drupal site, or through some other site-specific mechanism.

+

A visitor accessing your website is assigned a unique ID, or session ID, which is stored in a cookie. The cookie does not contain personal information, but acts as a key to retrieve information from your site. Users should have cookies enabled in their web browser when using your site.

+

For more information, see the online handbook entry for User module.

diff --git a/modules/user/help/user.help b/modules/user/help/user.help new file mode 100644 index 0000000..d1afcf9 --- /dev/null +++ b/modules/user/help/user.help @@ -0,0 +1,5 @@ +; $Id$ +[about] +title = About User +file = about +weight = -10 \ No newline at end of file