diff options
-rw-r--r-- | modules/help.module | 14 | ||||
-rw-r--r-- | modules/help/help.module | 14 | ||||
-rw-r--r-- | modules/node.module | 21 | ||||
-rw-r--r-- | modules/node/node.module | 21 |
4 files changed, 52 insertions, 18 deletions
diff --git a/modules/help.module b/modules/help.module index 8d92d9611..254432a7b 100644 --- a/modules/help.module +++ b/modules/help.module @@ -1,14 +1,12 @@ <?php -function help_module($name) { - if (module_hook($name, "help")) { - print "<H2><A NAME=\"$name\">". ucfirst($name) ." module</A></H2>"; - print module_invoke($name, "help"); - } -} - function help_admin() { - module_iterate("help_module"); + foreach (module_list() as $name) { + if (module_hook($name, "help")) { + print "<H2>". ucfirst($name) ." module</H2>"; + print module_invoke($name, "help"); + } + } } ?> diff --git a/modules/help/help.module b/modules/help/help.module index 8d92d9611..254432a7b 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -1,14 +1,12 @@ <?php -function help_module($name) { - if (module_hook($name, "help")) { - print "<H2><A NAME=\"$name\">". ucfirst($name) ." module</A></H2>"; - print module_invoke($name, "help"); - } -} - function help_admin() { - module_iterate("help_module"); + foreach (module_list() as $name) { + if (module_hook($name, "help")) { + print "<H2>". ucfirst($name) ." module</H2>"; + print module_invoke($name, "help"); + } + } } ?> diff --git a/modules/node.module b/modules/node.module index 0fdd5f701..a9686bf84 100644 --- a/modules/node.module +++ b/modules/node.module @@ -11,6 +11,22 @@ class Node { } } +function node_help() { + global $mod; + ?> + <P>Todo.</P> + <?php + + if ($mod == "node") { + foreach (module_list() as $name) { + if (module_hook($name, "status") && $name != "node") { + print "<H3>". ucfirst($name) ." type</H3>"; + print module_invoke($name, "help"); + } + } + } +} + function node_conf_filters() { $output .= form_select(t("Strip HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Strip HTML and PHP tags.")); $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<A><B><BLOCKQUOTE><DD><DL><DT><I><LI><OL><U><UL>"), 64, 128, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped.")); @@ -234,7 +250,7 @@ function node_admin() { } } - print "<SMALL>". implode(" | ", $link) ." | <A HREF=\"admin.php?mod=node&op=default\">node settings</A> | <A HREF=\"admin.php?mod=node&op=listing\">node listings</A> | <A HREF=\"admin.php?mod=node&op=search\">search node</A> | <A HREF=\"admin.php?mod=node\">overview</A></SMALL><HR>\n"; + print "<SMALL>". implode(" | ", $link) ." | <A HREF=\"admin.php?mod=node&op=default\">node settings</A> | <A HREF=\"admin.php?mod=node&op=listing\">node listings</A> | <A HREF=\"admin.php?mod=node&op=search\">search node</A> | <A HREF=\"admin.php?mod=node\">overview</A> | <A HREF=\"admin.php?mod=node&op=help\">help</A></SMALL><HR>\n"; $id = check_input($edit[nid] ? $edit[nid] : $id); @@ -242,6 +258,9 @@ function node_admin() { case "add": print module_invoke($type, "form"); break; + case "help": + print node_help(); + break; case "search": print node_search($id); print search_data($keys, $type); diff --git a/modules/node/node.module b/modules/node/node.module index 0fdd5f701..a9686bf84 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -11,6 +11,22 @@ class Node { } } +function node_help() { + global $mod; + ?> + <P>Todo.</P> + <?php + + if ($mod == "node") { + foreach (module_list() as $name) { + if (module_hook($name, "status") && $name != "node") { + print "<H3>". ucfirst($name) ." type</H3>"; + print module_invoke($name, "help"); + } + } + } +} + function node_conf_filters() { $output .= form_select(t("Strip HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Strip HTML and PHP tags.")); $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<A><B><BLOCKQUOTE><DD><DL><DT><I><LI><OL><U><UL>"), 64, 128, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped.")); @@ -234,7 +250,7 @@ function node_admin() { } } - print "<SMALL>". implode(" | ", $link) ." | <A HREF=\"admin.php?mod=node&op=default\">node settings</A> | <A HREF=\"admin.php?mod=node&op=listing\">node listings</A> | <A HREF=\"admin.php?mod=node&op=search\">search node</A> | <A HREF=\"admin.php?mod=node\">overview</A></SMALL><HR>\n"; + print "<SMALL>". implode(" | ", $link) ." | <A HREF=\"admin.php?mod=node&op=default\">node settings</A> | <A HREF=\"admin.php?mod=node&op=listing\">node listings</A> | <A HREF=\"admin.php?mod=node&op=search\">search node</A> | <A HREF=\"admin.php?mod=node\">overview</A> | <A HREF=\"admin.php?mod=node&op=help\">help</A></SMALL><HR>\n"; $id = check_input($edit[nid] ? $edit[nid] : $id); @@ -242,6 +258,9 @@ function node_admin() { case "add": print module_invoke($type, "form"); break; + case "help": + print node_help(); + break; case "search": print node_search($id); print search_data($keys, $type); |