help.module 2.77 KB
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/glossary", "glossary", "help_glossary", NULL, 8);
Dries's avatar
 
Dries committed
12
    menu("admin/help", "help", "help_admin", NULL, 9);
Dries's avatar
 
Dries committed
13 14 15
  }
}

Dries's avatar
 
Dries committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
function help_glossary() {

  $output .= "<h3>Glossary</h3><dl>";
  $output .= "<dt>Block</dt><dd>A small box containing information or content placed in the left-hand or right-hand sidebar of a web page.</dd>";
  $output .= "<dt>Comment</dt><dd>A note attached to a node. Usually intended to clarify, explain, criticize, or express an opinion on the original material.</dd>";
  $output .= "<dt>Moderation</dt><dd>The activity of making sure a post to a Drupal site fits in with what is expected for that Drupal site.<dl>";
  $output .= "<dt>Approved</dt><dd>A moderated post which has been accepted by the moderators for publication. (See published).</dd>";
  $output .= "<dt>Waiting</dt><dd>A moderated post which is still being voted on to be accepted for publication. (See published.)</dd>";
  $output .= "<dt>Moderators</dt><dd>The group of Drupal users that reviews posts before they are published. These users have the \"access submission queue\" permission. (See Published).</dd></dl></dd>";
  $output .= "<dt>Node</dt><dd>The basic data unit in Drupal. Everything is a node or an extention of a node.</dd>";
  $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>You can classify users into roles, for the purpose of setting lots of users' permissions at once.</dd>";
  $output .= "<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See ". l("taxonomy help","admin/taxonomy/help") .")</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 bite but is <u>not</u> logged in with that account. Also termed \"anonymous user\".</dd>";
  $output .= "</dl>";
  return t($output);

}

Dries's avatar
 
Dries committed
38
function help_admin() {
Dries's avatar
 
Dries committed
39 40 41

  foreach (module_list() as $name) {
    if (module_hook($name, "help")) {
Dries's avatar
 
Dries committed
42
      $links[] = l($name, "admin/help#$name");
Dries's avatar
 
Dries committed
43 44 45
    }
  }

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

Dries's avatar
 
Dries committed
48 49
  foreach (module_list() as $name) {
    if (module_hook($name, "help")) {
Dries's avatar
 
Dries committed
50
      print "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
Dries's avatar
 
Dries committed
51 52 53
      print module_invoke($name, "help");
    }
  }
Dries's avatar
 
Dries committed
54
}
Dries's avatar
 
Dries committed
55

Dries's avatar
 
Dries committed
56
?>