help.module 689 Bytes
Newer Older
Dries's avatar
 
Dries committed
1
<?php
2
// $Id$
Dries's avatar
 
Dries committed
3

4 5 6 7 8
function help_system($field){
  $system["description"] = t("Manages displaying online help.");
  return $system[$field];
}

Dries's avatar
 
Dries committed
9 10
function help_link($type) {
  if ($type == "admin") {
Dries's avatar
 
Dries committed
11
    menu("admin/help", "help", "help_admin", NULL, 9);
Dries's avatar
 
Dries committed
12 13 14
  }
}

Dries's avatar
 
Dries committed
15
function help_admin() {
Dries's avatar
 
Dries committed
16 17 18

  foreach (module_list() as $name) {
    if (module_hook($name, "help")) {
Dries's avatar
 
Dries committed
19
      $links[] = l($name, "admin/help#$name");
Dries's avatar
 
Dries committed
20 21 22
    }
  }

Dries's avatar
 
Dries committed
23
  print "<small>". implode(" &middot; ", $links) ."</small><hr />";
Dries's avatar
 
Dries committed
24

Dries's avatar
 
Dries committed
25 26
  foreach (module_list() as $name) {
    if (module_hook($name, "help")) {
Dries's avatar
 
Dries committed
27
      print "<h2><a name=\"$name\">". ucfirst($name) ." module</a></h2>";
Dries's avatar
 
Dries committed
28 29 30
      print module_invoke($name, "help");
    }
  }
Dries's avatar
 
Dries committed
31
}
Dries's avatar
 
Dries committed
32

Dries's avatar
 
Dries committed
33
?>