From b85eb11e113396490720572d11d30cd83c772ba1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 23 Jan 2004 18:42:43 +0000 Subject: Patch 5287 by Stefan: multiline help texts should become inside a single $output. --- modules/forum/forum.module | 60 ++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 32 deletions(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 8a41b4f91..38744796d 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -1,6 +1,33 @@ Creating a forum +

The forum module uses taxonomy to organize itself. To create a forum you first have to create a taxonomy 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, add some 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.\"

+

When you are happy with your vocabulary, go to administer » configutation » 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.

+

Icons

+

To disable icons, set the icon path as blank in administer » configutation » modules » forum.

+

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

", array("%taxonomy" => url("admin/taxonomy/add/vocabulary"), "%taxo-terms" => url("admin/taxonomy"), "%forums" => url("admin/system/modules/forum"), "%permission" => url("admin/user/permission"))); + break; + case 'admin/system/modules#description': + $output = t("Enable threaded discussions about general topics."); + break; + case 'admin/system/modules/forum': + $output = t("Forums are threaded discussions based on the taxonomy system. For the forums to work, the taxonomy module has to be installed and enabled. When activated, a taxonomy vocabulary (eg. \"forums\") needs to be created and bound to the node type \"forum topic\".", array('%created' => url('admin/taxonomy/add/vocabulary'))); + break; + case 'node/add/forum': + $output = variable_get('forum_help', ''); + break; + } + + return $output; +} + function forum_node($field) { $info["name"] = t("forum topic"); $info["description"] = t("A forum is a threaded discussion, enabling users to communicate about a particular topic."); @@ -393,10 +420,6 @@ function _forum_new($tid) { return $nid ? $nid : 0; } -function _forum_message_taxonomy() { - return t("Forums are threaded discussions based on the taxonomy system. For the forums to work, the taxonomy module has to be installed and enabled. When activated, a taxonomy vocabulary (eg. \"forums\") needs to be created and bound to the node type \"forum topic\".", array('%created' => url('admin/taxonomy/add/vocabulary'))); -} - function forum_page() { global $sortby, $forum_per_page, $from, $user; @@ -431,7 +454,7 @@ function forum_page() { print theme("forum_display", $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset); } else { - print theme("page", _forum_message_taxonomy(), t("Warning")); + print theme("page", forum_help("admin/system/modules/forum"), t("Warning")); } } else { @@ -675,31 +698,4 @@ function _forum_get_topic_order($sortby) { } } -function forum_help($section = "admin/help#forum") { - $output = ""; - - switch ($section) { - case 'admin/help#forum': - $output .= "

Creating a forum

"; - $output .= "

The forum module uses taxonomy to organize itself. To create a forum you first have to create a taxonomy 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, add some 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.\"

"; - $output .= "

When you are happy with your vocabulary, go to administer » configutation » 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.

"; - $output .= "

Icons

"; - $output .= "

To disable icons, set the icon path as blank in administer » configutation » modules » 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 recommended to use 15x15 or 16x16.

"; - $output = t($output, array("%taxonomy" => url("admin/taxonomy/add/vocabulary"), "%taxo-terms" => url("admin/taxonomy"), "%forums" => url("admin/system/modules/forum"), "%permission" => url("admin/user/permission"))); - break; - case 'admin/system/modules#description': - $output = t("Enable threaded discussions about general topics."); - break; - case 'admin/system/modules/forum': - $output = _forum_message_taxonomy(); - break; - case 'node/add/forum': - $output = variable_get('forum_help', ''); - break; - } - - return $output; -} - ?> -- cgit v1.2.3