diff options
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r-- | modules/forum/forum.module | 42 |
1 files changed, 30 insertions, 12 deletions
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 <a href=\"%taxonomy-create\">taxonomy</a> of type \"forum\" to place the forum tree in. Then <a href=\"%taxonomy\">add terms</a> 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 .= "<h3>Creating a forum</h3><p>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.\"</p>"; - $output .= "<p>When you are happy with your vocabulary, go to ". l("site configuration » modules » forum","admin/system/modules/forum") ." and set <b>Forum vocabulary</b> 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.</p>"; - $output .= "<h3>Containers</h3><p>If you designate a forum as a <i>container</i>, 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,</p>"; - $output .= "<p>Marketing<br />-- Market research<br />-- Brand management<br /><br />Sales<br />-- Closing the deal<br />-- Avoiding ear and throat pain</p>"; - $output .= "<p>If you don't want people posting into the Marketing or Sales folders, you designate them as Containers.</p>"; - $output .= "<h4>Icons</h4><p>To disable icons, set the icon path as blank in ". l("site configuration » modules » forums","admin/system/module/forum") ."</p>"; - $output .= "<p>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.</p>"; - return t($output); +function forum_help($section = "admin/forum/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/forum/help': + $output .= "<h3>Creating a forum</h3>"; + $output .= strtr("<p>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.\"</p>", array("%taxonomy" => l(t("taxonomy vocabulary"), "admin/taxonomy/add/vocabulary"), "%taxo-terms" => l(t("add some terms"), "admin/taxonomy" ) )); + $output .= strtr("<p>When you are happy with your vocabulary, go to ". l("site configuration » modules » forum","admin/system/modules/forum") ." and set <b>Forum vocabulary</b> 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.</p>", array("%forums" => l(t("site configutation » modules » forum"), "admin/system/modules/forum"), "%permission" => l(t("permission"), "admin/user/permission") )); + $output .= "<h3>Containers</h3><p>If you designate a forum as a <i>container</i>, 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,</p>"; + $output .= "<p>Marketing<br />-- Market research<br />-- Brand management<br /><br />Sales<br />-- Closing the deal<br />-- Avoiding ear and throat pain</p>"; + $output .= "<p>If you don't want people posting into the Marketing or Sales folders, you designate them as Containers.</p>"; + $output .= "<h4>Icons</h4>"; + $output .= strtr("<p>To disable icons, set the icon path as blank in %forums-icon.</p>",array("%forums-icon" => l(t("site configuration » modules » forums"), "admin/system/module/forum") )); + $output .= "<p>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.</p>"; + 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); } ?> |