summaryrefslogtreecommitdiff
path: root/modules/help
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-03 14:55:27 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-03 14:55:27 +0000
commit058971c33b8dca63fd33b188328fc3e3ec9fb372 (patch)
treede80494d6eca73119a1ff2d3a9fe448ea0c13497 /modules/help
parent35f3bcd0426ea207e40c4a2dd6cae8a1d26c794e (diff)
downloadbrdo-058971c33b8dca63fd33b188328fc3e3ec9fb372.tar.gz
brdo-058971c33b8dca63fd33b188328fc3e3ec9fb372.tar.bz2
- Help improvements and translation improvements from Michael. Thanks!
Diffstat (limited to 'modules/help')
-rw-r--r--modules/help/help.module41
1 files changed, 27 insertions, 14 deletions
diff --git a/modules/help/help.module b/modules/help/help.module
index abd8f242d..9a4bd5d3f 100644
--- a/modules/help/help.module
+++ b/modules/help/help.module
@@ -2,8 +2,11 @@
// $Id$
function help_system($field){
- $system["description"] = t("Manages displaying online help.");
- return $system[$field];
+ $output = "";
+
+ if ($field == "description") {$output = admin_help("admin/system/modules"); };
+
+ return $output;
}
function help_link($type) {
@@ -26,29 +29,39 @@ function help_glossary() {
$output .= "<dt>Public</dt><dd>See published.</dd>";
$output .= "<dt>Published</dt><dd>A node that is viewable by everyone. (See unpublished.)</dd>";
$output .= "<dt>Role</dt><dd>A classification users are placed into for the purpose of setting users' permissions.</dd>";
- $output .= strtr("<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See %taxonomy.)</dd>", array("%taxonomy" => l(t("taxonomy help"), "admin/taxonomy/help")));
+ $output .= "<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See %taxonomy.)</dd>";
$output .= "<dt>Unpublished</dt><dd>A node that is only viewable by administrators and moderators.</dd>";
$output .= "<dt>User</dt><dd>A person who has an account at your Drupal site, and is logged in with that account.</dd>";
$output .= "<dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal site but is <u>not</u> logged in with that account. Also termed \"anonymous user\".</dd>";
$output .= "</dl>";
+ $output = t($output, array("%taxonomy" => l(t("taxonomy help"), "admin/taxonomy/help")));
- return t($output);
+ return $output;
}
-function help_admin() {
+function help_admin($section = "admin/help") {
$output = "";
- foreach (module_list() as $name) {
- if (module_hook($name, "help")) {
- $temp = module_invoke($name, "help", "admin/".$name."/help");
- if (!empty($temp)) {
- $links[] = l($name, "admin/help#$name");
- $output .= "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
- $output .= $temp;
+ switch ($section) {
+
+ case 'admin/help':
+ foreach (module_list() as $name) {
+ if (module_hook($name, "help")) {
+ $temp = module_invoke($name, "help", "admin/".$name."/help");
+ if (!empty($temp)) {
+ $links[] = l($name, "admin/help#$name");
+ $output .= "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
+ $output .= $temp;
+ }
+ }
}
- }
+ $output = "<small>". implode(" &middot; ", $links) ."</small><hr />". $output;
+ break;
+
+ case 'admin/system/modules':
+ $out = t("Manages displaying online help.");
+ break;
}
- $output = "<small>". implode(" &middot; ", $links) ."</small><hr />". $output;
return $output;
}