From 56c662174d64a06c6ff094c9993e28216426877a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 6 Aug 2003 21:14:05 +0000 Subject: - More help system improvements by Michael. --- modules/forum/forum.module | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'modules/forum') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 1613b020b..212256331 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -2,9 +2,12 @@ // $Id$ function forum_system($field){ - $system["description"] = t("Enable threaded discussions about general topics."); - $system["admin_help"] = t("Forums are threaded discussions based on the taxonomy system so you must first define a taxonomy of type \"forum\" to place the forum tree in. Then add terms to this taxonomy. Each term becomes the name of a forum. If you define a term as a \"Container\" (See below) the term is not a forum itself, but rather holds forms. This lets you group your forums.", array("%taxonomy-create" => url("admin/taxonomy/add/vocabulary"), "%taxonomy" => url("admin/taxonomy"))); - return $system[$field]; + $output = ""; + + if ($field == "description") { $output = forum_help("admin/system/modules"); } + else if ($field == "admin_help") { $output = forum_help("admin/system/modules/forum"); }; + + return $output; } function forum_node($field) { @@ -704,16 +707,31 @@ function _forum_get_topic_order($sortby) { } } -function forum_help() { - $output .= "

Creating a forum

The forum module uses taxonomy to organize itself. To create a forum you first have to create a ". l("taxonomy vocuabulary", "admin/taxonomy/add/vocabulary") ." When doing this, choose a sensible name for it (such as \"fora\") and make sure under \"Types\" that \"forum\" is selected. Once you have done this, ". l("add some terms", "admin/taxonomy") ." to it. Each term will become a forum. If you fill in the description field, users will be given additonal information about the forum on the main forum page. For example: \"troubleshooting\" - \"Please ask your questions here.\"

"; - $output .= "

When you are happy with your vocabulary, go to ". l("site configuration » modules » forum","admin/system/modules/forum") ." and set Forum vocabulary to the one you have just created. There will now be fora active on the site. For users to access them they must have the \"access content\" permission and to create a topic they must have ithe \"create forum topics\" permission. These permissions can be set in the ". l("user management", "admin/user/permission") ." pages.

"; - $output .= "

Containers

If you designate a forum as a container, users will not be able to post to it. The forum will be visible on the forum listing page, so it acts as a section delimiter if you will. This is useful if you have a lots of forums which are nested. For example,

"; - $output .= "

Marketing
-- Market research
-- Brand management

Sales
-- Closing the deal
-- Avoiding ear and throat pain

"; - $output .= "

If you don't want people posting into the Marketing or Sales folders, you designate them as Containers.

"; - $output .= "

Icons

To disable icons, set the icon path as blank in ". l("site configuration » modules » forums","admin/system/module/forum") ."

"; - $output .= "

All files in the icon directory are assumed to be images. You may use images of whatever size you wish, but it is customary to use 15x15 or 16x16.

"; - return t($output); +function forum_help($section = "admin/forum/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/forum/help': + $output .= "

Creating a forum

"; + $output .= strtr("

The forum module uses taxonomy to organize itself. To create a forum you first have to create a %taxonomy. When doing this, choose a sensible name for it (such as \"fora\") and make sure under \"Types\" that \"forum\" is selected. Once you have done this, %taxo-terms to it. Each term will become a forum. If you fill in the description field, users will be given additonal information about the forum on the main forum page. For example: \"troubleshooting\" - \"Please ask your questions here.\"

", array("%taxonomy" => l(t("taxonomy vocabulary"), "admin/taxonomy/add/vocabulary"), "%taxo-terms" => l(t("add some terms"), "admin/taxonomy" ) )); + $output .= strtr("

When you are happy with your vocabulary, go to ". l("site configuration » modules » forum","admin/system/modules/forum") ." and set Forum vocabulary to the one you have just created. There will now be fora active on the site. For users to access them they must have the \"access content\" %permission and to create a topic they must have the \"create forum topics\" %permission. These permissions can be set in the %permission pages.

", array("%forums" => l(t("site configutation » modules » forum"), "admin/system/modules/forum"), "%permission" => l(t("permission"), "admin/user/permission") )); + $output .= "

Containers

If you designate a forum as a container, users will not be able to post to it. The forum will be visible on the forum listing page, so it acts as a section delimiter if you will. This is useful if you have a lots of forums which are nested. For example,

"; + $output .= "

Marketing
-- Market research
-- Brand management

Sales
-- Closing the deal
-- Avoiding ear and throat pain

"; + $output .= "

If you don't want people posting into the Marketing or Sales folders, you designate them as Containers.

"; + $output .= "

Icons

"; + $output .= strtr("

To disable icons, set the icon path as blank in %forums-icon.

",array("%forums-icon" => l(t("site configuration » modules » forums"), "admin/system/module/forum") )); + $output .= "

All files in the icon directory are assumed to be images. You may use images of whatever size you wish, but it is customary to use 15x15 or 16x16.

"; + break; + case 'admin/system/modules': + $output = "Enable threaded discussions about general topics."; + break; + case 'admin/system/modules/forum': + $output = strtr("Forums are threaded discussions based on the taxonomy system so you must first %taxonomy-create of type \"forum\" to place the forum tree in. Then %taxonomy-add to this taxonomy. Each term becomes the name of a forum. If you define a term as a \"Container\" (See below) the term is not a forum itself, but rather holds forms. This lets you group your forums.", array("%taxonomy-create" => l(t("create a taxonomy"), "admin/taxonomy/add/vocabulary"), "%taxonomy" => l(t("add terms"), "admin/taxonomy") )); + break; + } + return t($output); } ?> -- cgit v1.2.3