diff options
-rw-r--r-- | modules/comment.module | 32 | ||||
-rw-r--r-- | modules/comment/comment.module | 32 | ||||
-rw-r--r-- | modules/drupal.module | 38 | ||||
-rw-r--r-- | modules/drupal/drupal.module | 38 | ||||
-rw-r--r-- | modules/forum.module | 42 | ||||
-rw-r--r-- | modules/forum/forum.module | 42 |
6 files changed, 132 insertions, 92 deletions
diff --git a/modules/comment.module b/modules/comment.module index 66667bf68..4ef227806 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -718,32 +718,22 @@ function comment_link($type, $node = 0, $main = 0) { } if ($type == "admin" && user_access("administer comments")) { - $help["general"] = t("Comments let users give feedback to content authors. Here you may review/approve/deny recent comments, and configure moderation if desired."); - $help["post-overview"] = t("Click on <a href=\"%nup\">new or updated comments</a> to see your latest comments, or <a href=\"%queue\">comment approval queue</a> to approve new comments.", array("%nup" => url("admin/comment/0"), "%queue" => url("admin/comment/1"))); - $help["new-update"] = t("Below is a list of the latest comments posted your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit comment\" to edit the comment, and \"delete comment\" to remove the comment."); - $help["queue"] = t("Below is a list of the comments posted to your site that need <b>approval</b>. To approve a comment click on <b>\"edit comment\"</b> and then change it's <b>moderation status</b> to Approved.<br />Click on a subject to see the comment, the author's name to edit the author's user information, \"edit comment\" to edit the comment, and \"delete comment\" to remove the comment."); - $help["moderation-overview"] = t("If you have a get a lot of comments, you can enable comment moderation. Once moderation is enabled users can vote on a comment based on dropdown menus. <a href=\"%votes\">votes</a> sets up the names of each item, and the order of the menu, using weights. <a href=\"%matrix\">matrix</a> sets up the value of each user's vote, and <a href=\"%threshold\">threshold</a> sets up the levels at which a comment will be displayed.", array("%votes" => url("admin/comment/moderation/votes"), "%matrix" => url("admin/comment/moderation/matrix"), "%threshold" => url("admin/comment/moderation/threshold"))); - $help["moderation-vote"] = t("Here is where you setup the names of each type of vote. Weight lets you set the order of the drop down menu. Click <b>edit</b> to edit a current vote weight.<br />Notes: <ul><li>you can have more than one type with the same name. The system does not protect you from this.</li><li>To <b>delete</b> a name/weight combiniation go to the <b>edit</b> area.</li></ul>"); - $help["moderation-matrix"] = t("Here is where you assign a value to each item in the dropdown. This value is added to the vote total, which is then divided by the number of users who have voted and rounded off to the nearest integer.<br />Notes:<ul><li>In order to use comment moderation, every text box on this page should be populated.</li><li>You must assign the <b>moderate comments</b> permission to at least one role in order to use this page.</li><li>Every box not filled in will have a value of zero, which will have the effect of <b>lowering</b> a comments over all score.</li></ul> "); - $help["moderation-threshold"] = t("<i>Optional</i> Here you can setup the name and minimum \"cut off\" score to help your users hide comments that they don't want too see. These thresholds appear in the Comment Control Panel. Click \"edit\" to edit the values of an already exsisting threashold. To <b>delete</b> a threshold click on \"edit\". "); - $help["initial"] = t("Here you can setup the <b>initial</b> vote value of a comment posted by each user role. This value is used before any other users vote on the comment.<br />Note: Blank entries are valued at zero"); - $help["search"] = t("Enter a simple pattern ( '*' maybe used as a wildcard match) to search for a comment. For example, one may search for 'br' and Drupal might return 'bread brakers', 'our daily bread' and 'brenda'."); - - menu("admin/comment", "comment management", "comment_admin", $help["general"], 2); - menu("admin/comment/comments", "comment overview",NULL, $help["post-overview"], 2); - menu("admin/comment/comments/0", "new or updated comments", "comment_admin", $help["new-update"], 1); - menu("admin/comment/comments/1", "comment approval queue", "comment_admin", $help["queue"], 2); - menu("admin/comment/search", "search comments", "comment_admin", $help["search"], 8); + + menu("admin/comment", "comment management", "comment_admin", comment_help("admin/comment"), 2); + menu("admin/comment/comments", "comment overview",NULL, comment_help("admin/comment/comments"), 2); + menu("admin/comment/comments/0", "new or updated comments", "comment_admin", comment_help("admin/comment/comments/0"), 1); + menu("admin/comment/comments/1", "comment approval queue", "comment_admin", comment_help("admin/comment/comments/1"), 2); + menu("admin/comment/search", "search comments", "comment_admin", comment_help("admin/comment/search"), 8); menu("admin/comment/help", "help", "comment_help", NULL, 9); menu("admin/comment/edit", "edit comment", "comment_admin", NULL, 0, 1); // comment settings: if (user_access("administer moderation")) { - menu("admin/comment/moderation", "comment moderation", NULL, $help["moderation-overview"], 3); - menu("admin/comment/moderation/votes", "votes", "comment_admin", $help["moderation-vote"]); - menu("admin/comment/moderation/matrix", "matrix", "comment_admin", $help["moderation-matrix"]); - menu("admin/comment/moderation/filters", "thresholds", "comment_admin", $help["moderation-threshold"]); - menu("admin/comment/roles", "initial comment scores", "comment_admin", $help["initial"], 6); + menu("admin/comment/moderation", "comment moderation", NULL, comment_help("admin/comment/moderation"), 3); + menu("admin/comment/moderation/votes", "votes", "comment_admin", comment_help("admin/comment/moderation/votes")); + menu("admin/comment/moderation/matrix", "matrix", "comment_admin", comment_help("admin/comment/moderation/matrix")); + menu("admin/comment/moderation/filters", "thresholds", "comment_admin", comment_help("admin/comment/moderation/filters")); + menu("admin/comment/roles", "initial comment scores", "comment_admin", comment_help("admin/comment/roles"), 6); } } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 66667bf68..4ef227806 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -718,32 +718,22 @@ function comment_link($type, $node = 0, $main = 0) { } if ($type == "admin" && user_access("administer comments")) { - $help["general"] = t("Comments let users give feedback to content authors. Here you may review/approve/deny recent comments, and configure moderation if desired."); - $help["post-overview"] = t("Click on <a href=\"%nup\">new or updated comments</a> to see your latest comments, or <a href=\"%queue\">comment approval queue</a> to approve new comments.", array("%nup" => url("admin/comment/0"), "%queue" => url("admin/comment/1"))); - $help["new-update"] = t("Below is a list of the latest comments posted your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit comment\" to edit the comment, and \"delete comment\" to remove the comment."); - $help["queue"] = t("Below is a list of the comments posted to your site that need <b>approval</b>. To approve a comment click on <b>\"edit comment\"</b> and then change it's <b>moderation status</b> to Approved.<br />Click on a subject to see the comment, the author's name to edit the author's user information, \"edit comment\" to edit the comment, and \"delete comment\" to remove the comment."); - $help["moderation-overview"] = t("If you have a get a lot of comments, you can enable comment moderation. Once moderation is enabled users can vote on a comment based on dropdown menus. <a href=\"%votes\">votes</a> sets up the names of each item, and the order of the menu, using weights. <a href=\"%matrix\">matrix</a> sets up the value of each user's vote, and <a href=\"%threshold\">threshold</a> sets up the levels at which a comment will be displayed.", array("%votes" => url("admin/comment/moderation/votes"), "%matrix" => url("admin/comment/moderation/matrix"), "%threshold" => url("admin/comment/moderation/threshold"))); - $help["moderation-vote"] = t("Here is where you setup the names of each type of vote. Weight lets you set the order of the drop down menu. Click <b>edit</b> to edit a current vote weight.<br />Notes: <ul><li>you can have more than one type with the same name. The system does not protect you from this.</li><li>To <b>delete</b> a name/weight combiniation go to the <b>edit</b> area.</li></ul>"); - $help["moderation-matrix"] = t("Here is where you assign a value to each item in the dropdown. This value is added to the vote total, which is then divided by the number of users who have voted and rounded off to the nearest integer.<br />Notes:<ul><li>In order to use comment moderation, every text box on this page should be populated.</li><li>You must assign the <b>moderate comments</b> permission to at least one role in order to use this page.</li><li>Every box not filled in will have a value of zero, which will have the effect of <b>lowering</b> a comments over all score.</li></ul> "); - $help["moderation-threshold"] = t("<i>Optional</i> Here you can setup the name and minimum \"cut off\" score to help your users hide comments that they don't want too see. These thresholds appear in the Comment Control Panel. Click \"edit\" to edit the values of an already exsisting threashold. To <b>delete</b> a threshold click on \"edit\". "); - $help["initial"] = t("Here you can setup the <b>initial</b> vote value of a comment posted by each user role. This value is used before any other users vote on the comment.<br />Note: Blank entries are valued at zero"); - $help["search"] = t("Enter a simple pattern ( '*' maybe used as a wildcard match) to search for a comment. For example, one may search for 'br' and Drupal might return 'bread brakers', 'our daily bread' and 'brenda'."); - - menu("admin/comment", "comment management", "comment_admin", $help["general"], 2); - menu("admin/comment/comments", "comment overview",NULL, $help["post-overview"], 2); - menu("admin/comment/comments/0", "new or updated comments", "comment_admin", $help["new-update"], 1); - menu("admin/comment/comments/1", "comment approval queue", "comment_admin", $help["queue"], 2); - menu("admin/comment/search", "search comments", "comment_admin", $help["search"], 8); + + menu("admin/comment", "comment management", "comment_admin", comment_help("admin/comment"), 2); + menu("admin/comment/comments", "comment overview",NULL, comment_help("admin/comment/comments"), 2); + menu("admin/comment/comments/0", "new or updated comments", "comment_admin", comment_help("admin/comment/comments/0"), 1); + menu("admin/comment/comments/1", "comment approval queue", "comment_admin", comment_help("admin/comment/comments/1"), 2); + menu("admin/comment/search", "search comments", "comment_admin", comment_help("admin/comment/search"), 8); menu("admin/comment/help", "help", "comment_help", NULL, 9); menu("admin/comment/edit", "edit comment", "comment_admin", NULL, 0, 1); // comment settings: if (user_access("administer moderation")) { - menu("admin/comment/moderation", "comment moderation", NULL, $help["moderation-overview"], 3); - menu("admin/comment/moderation/votes", "votes", "comment_admin", $help["moderation-vote"]); - menu("admin/comment/moderation/matrix", "matrix", "comment_admin", $help["moderation-matrix"]); - menu("admin/comment/moderation/filters", "thresholds", "comment_admin", $help["moderation-threshold"]); - menu("admin/comment/roles", "initial comment scores", "comment_admin", $help["initial"], 6); + menu("admin/comment/moderation", "comment moderation", NULL, comment_help("admin/comment/moderation"), 3); + menu("admin/comment/moderation/votes", "votes", "comment_admin", comment_help("admin/comment/moderation/votes")); + menu("admin/comment/moderation/matrix", "matrix", "comment_admin", comment_help("admin/comment/moderation/matrix")); + menu("admin/comment/moderation/filters", "thresholds", "comment_admin", comment_help("admin/comment/moderation/filters")); + menu("admin/comment/roles", "initial comment scores", "comment_admin", comment_help("admin/comment/roles"), 6); } } diff --git a/modules/drupal.module b/modules/drupal.module index afb278ca2..79b724c59 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -1,24 +1,36 @@ <?php // $Id$ -function drupal_help_directory() { +function drupal_help($section = "admin/drupal/help") { + $output = ""; + + switch($section) { + case 'admin/help': + case 'admin/drupal/help': + $output .= "<p>The \"Drupal\" module features a capability whereby other drupal sites may <i>call home</i> to report their existence. In turn, this enables a pod of Drupal sites to find, cooperate and advertise each other.</p>"; + $output .= strtr("<p>Currently, the main application of this feature is the %drupal-sites. By default, fresh Drupal installations can use %Drupal as their <i>directory server</i> and report their existence. This reporting occurs via scheduled %xml-rpc pings.</p>", array("%drupal-sites" => l(t("Drupal sites page"), "www.drupal.org/node/view/3", array("location" => "global")), "%Drupal" => l(t("drupal.org"),"www.drupal.org", array("location" => "global")), "%xml-rpc" => l(t("XML-RPC"), "www.xmlrpc.com", array("location" => "global")) )); + $output .= strtr("<p>Drupal administrators should simply enable this feature to get listed on the %drupal-sites; just set your site's name, e-mail address, slogan and mission statement. Then make sure that the field called <i>Drupal XML-RPC server</i> on the %drupal-settings page is set to http://www.drupal.org/xmlrpc.php, and enable this feature using the dropdown directly below.</p>", array("%drupal-sites" => l(t("Drupal sites page"), "www.drupal.org/node/view/3", array("location" => "global")), "%drupal-settings" => l(t("Administration » site configuration » modules » drupal"), "admin/system/modules/drupal") )); + $output .= strtr("<p>The listing of your site will occur shortly after your site's next %cron. Note that cron.php should be called using the domain name which you want to have listed at %Drupal. For example, don't kick off cron by requesting http://127.0.0.1/cron.php. Instead, use a publicly accessible domain name such as http://www.mydomain.org/cron.php.</p>", array("%cron" => l(t("cron run"), "admin/system/help#cron"), "%Drupal" => l(t("drupal.org"), "www.drupal.org", array("localtion" => "global")) )); + $output .= "<p>Also note that your installation need not use drupal.org as its directory server. For example, this feature is perfectly capable of aggregating pings from all of your departmental drupal installations sites within an enterprise.</p>"; + break; + case 'admin/system/modules': + $output = "Lets users log in using a Drupal ID and can notify drupal.org about your site."; + break; + case 'admin/system/modules/drupal': + $output = strtr("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the %Drupal-setting setting -- but the directory server has to be able to handle Drupal XML. To get a full site listing go to the %general and set:<ul><li>The site name,</li><li>The site E-Mail address,</li><li>The site slogan, and</li><li>The site mission statement.</li></ul>", array("%Drupal-setting" => l(t("Drupal XML-RPC server"), "admin/system/modules/drupal"), "%general" => l(t("site configuration"), "admin/system") )); + break; + } - $output .= "<p>The \"Drupal\" module features a capability whereby other drupal sites may <i>call home</i> to report their existence. In turn, this enables a pod of Drupal sites to find, cooperate and advertise each other.</p>"; - $output .= "<p>Currently, the main application of this feature is the <a href=\"http://www.drupal.org/node/view/3\">Drupal sites page</a>. By default, fresh Drupal installations can use <a href=\"http://www.drupal.org/\">drupal.org</a> as their <i>directory server</i> and report their existence. This reporting occurs via scheduled <a href=\"http://www.xmlrpc.com/\">XML-RPC</a> pings.</p>"; - $output .= "<p>Drupal administrators should simply enable this feature to get listed on the <a href=\"http://www.drupal.org/node/view/3\">Drupal sites page</a>; just set your site's name, e-mail address, slogan and mission statement. Then make sure that the field called <i>Drupal XML-RPC server</i> on the <i>site settings</i> tab of the <i>site configuration</i> page is set to http://www.drupal.org/xmlrpc.php. Also, make sure you enable this feature using the checkbox directly below.</p>"; - $output .= "<p>The listing of your site will occur shortly after your site's next ". l("cron run", "admin/system/help") .". Note that cron.php should be called using the domain name which you want to have listed at <a href=\"http://www.drupal.org/\">drupal.org</a>. For example, don't kick off cron by requesting http://127.0.0.1/cron.php. Instead, use a publicly accessible domain name such as http://www.mydomain.org/cron.php.</p>"; - $output .= "<p>Also note that your installation need not use drupal.org as its directory server. For example, this feature is perfectly capable of aggregating pings from all of your departmental drupal installations sites within an enterprise.</p>"; return t($output); } -function drupal_help() { - return drupal_help_directory(); -} - function drupal_system($field) { - $system["description"] = t("Lets users log in using a Drupal ID and can notify drupal.org about your site."); - $system["admin_help"] = t("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the \"Drupal XML-RPC server\" setting -- but the directory server has to be able to handle Drupal XML. To get a full listing go to <a href=\"%general\">site configuration</a> and set:<ul><li>The site name,</li><li>Site E-Mail address,</li><li>Site slogan, and</li><li>The sire mission statement.</li></ul>",array("%general" => url("admin/system"))); - return $system[$field]; + $output = ""; + + if ($field == "description") { $output = drupal_help("admin/system/modules"); } + else if ($field == "admin_help") { $output = drupal_help("admin/system/modules/drupal"); }; + + return $output; } function drupal_settings() { diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index afb278ca2..79b724c59 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -1,24 +1,36 @@ <?php // $Id$ -function drupal_help_directory() { +function drupal_help($section = "admin/drupal/help") { + $output = ""; + + switch($section) { + case 'admin/help': + case 'admin/drupal/help': + $output .= "<p>The \"Drupal\" module features a capability whereby other drupal sites may <i>call home</i> to report their existence. In turn, this enables a pod of Drupal sites to find, cooperate and advertise each other.</p>"; + $output .= strtr("<p>Currently, the main application of this feature is the %drupal-sites. By default, fresh Drupal installations can use %Drupal as their <i>directory server</i> and report their existence. This reporting occurs via scheduled %xml-rpc pings.</p>", array("%drupal-sites" => l(t("Drupal sites page"), "www.drupal.org/node/view/3", array("location" => "global")), "%Drupal" => l(t("drupal.org"),"www.drupal.org", array("location" => "global")), "%xml-rpc" => l(t("XML-RPC"), "www.xmlrpc.com", array("location" => "global")) )); + $output .= strtr("<p>Drupal administrators should simply enable this feature to get listed on the %drupal-sites; just set your site's name, e-mail address, slogan and mission statement. Then make sure that the field called <i>Drupal XML-RPC server</i> on the %drupal-settings page is set to http://www.drupal.org/xmlrpc.php, and enable this feature using the dropdown directly below.</p>", array("%drupal-sites" => l(t("Drupal sites page"), "www.drupal.org/node/view/3", array("location" => "global")), "%drupal-settings" => l(t("Administration » site configuration » modules » drupal"), "admin/system/modules/drupal") )); + $output .= strtr("<p>The listing of your site will occur shortly after your site's next %cron. Note that cron.php should be called using the domain name which you want to have listed at %Drupal. For example, don't kick off cron by requesting http://127.0.0.1/cron.php. Instead, use a publicly accessible domain name such as http://www.mydomain.org/cron.php.</p>", array("%cron" => l(t("cron run"), "admin/system/help#cron"), "%Drupal" => l(t("drupal.org"), "www.drupal.org", array("localtion" => "global")) )); + $output .= "<p>Also note that your installation need not use drupal.org as its directory server. For example, this feature is perfectly capable of aggregating pings from all of your departmental drupal installations sites within an enterprise.</p>"; + break; + case 'admin/system/modules': + $output = "Lets users log in using a Drupal ID and can notify drupal.org about your site."; + break; + case 'admin/system/modules/drupal': + $output = strtr("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the %Drupal-setting setting -- but the directory server has to be able to handle Drupal XML. To get a full site listing go to the %general and set:<ul><li>The site name,</li><li>The site E-Mail address,</li><li>The site slogan, and</li><li>The site mission statement.</li></ul>", array("%Drupal-setting" => l(t("Drupal XML-RPC server"), "admin/system/modules/drupal"), "%general" => l(t("site configuration"), "admin/system") )); + break; + } - $output .= "<p>The \"Drupal\" module features a capability whereby other drupal sites may <i>call home</i> to report their existence. In turn, this enables a pod of Drupal sites to find, cooperate and advertise each other.</p>"; - $output .= "<p>Currently, the main application of this feature is the <a href=\"http://www.drupal.org/node/view/3\">Drupal sites page</a>. By default, fresh Drupal installations can use <a href=\"http://www.drupal.org/\">drupal.org</a> as their <i>directory server</i> and report their existence. This reporting occurs via scheduled <a href=\"http://www.xmlrpc.com/\">XML-RPC</a> pings.</p>"; - $output .= "<p>Drupal administrators should simply enable this feature to get listed on the <a href=\"http://www.drupal.org/node/view/3\">Drupal sites page</a>; just set your site's name, e-mail address, slogan and mission statement. Then make sure that the field called <i>Drupal XML-RPC server</i> on the <i>site settings</i> tab of the <i>site configuration</i> page is set to http://www.drupal.org/xmlrpc.php. Also, make sure you enable this feature using the checkbox directly below.</p>"; - $output .= "<p>The listing of your site will occur shortly after your site's next ". l("cron run", "admin/system/help") .". Note that cron.php should be called using the domain name which you want to have listed at <a href=\"http://www.drupal.org/\">drupal.org</a>. For example, don't kick off cron by requesting http://127.0.0.1/cron.php. Instead, use a publicly accessible domain name such as http://www.mydomain.org/cron.php.</p>"; - $output .= "<p>Also note that your installation need not use drupal.org as its directory server. For example, this feature is perfectly capable of aggregating pings from all of your departmental drupal installations sites within an enterprise.</p>"; return t($output); } -function drupal_help() { - return drupal_help_directory(); -} - function drupal_system($field) { - $system["description"] = t("Lets users log in using a Drupal ID and can notify drupal.org about your site."); - $system["admin_help"] = t("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the \"Drupal XML-RPC server\" setting -- but the directory server has to be able to handle Drupal XML. To get a full listing go to <a href=\"%general\">site configuration</a> and set:<ul><li>The site name,</li><li>Site E-Mail address,</li><li>Site slogan, and</li><li>The sire mission statement.</li></ul>",array("%general" => url("admin/system"))); - return $system[$field]; + $output = ""; + + if ($field == "description") { $output = drupal_help("admin/system/modules"); } + else if ($field == "admin_help") { $output = drupal_help("admin/system/modules/drupal"); }; + + return $output; } function drupal_settings() { diff --git a/modules/forum.module b/modules/forum.module index 1613b020b..212256331 100644 --- a/modules/forum.module +++ b/modules/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); } ?> 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); } ?> |