Select Git revision
comment.module

Dries Buytaert authored
- Fixed the title and breadcrumb trail of the comment delete page, added missing cache flush, improved usability and made it so that when you delete a comment replies are deleted as well. - Added 'delete comment' links to the comments on node pages. Hopefully this will make it easier to maintain old threads such as those attached to the book pages on drupal.org. - Comment module maintenance: added missing t() functions and improved consistency of the calls to drupal_set_message(), used radio buttons instead of a selection box.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
comment.module 67.19 KiB
<?php
// $Id$
function comment_help($section = "admin/help#comment") {
$output = "";
switch ($section) {
case 'admin/help#comment':
$output .= "<p>When enabled, the Drupal comment module creates a discussion board for each Drupal node. Users can post comments to discuss a forum topic, weblog post, collaborative book page, etc.</p>";
$output .= "<h3>User control of comment display</h3>";
$output .= "<p>Attached to each comment board is a control panel for customizing the way that comments are displayed. Users can control the chronological ordering of posts (newest or oldest first) and the number of posts to display on each page. Additional settings include:</p>";
$output .= "<ul>";
$output .= "<li><b>Threaded</b> -- Displays the posts grouped according to conversations and subconversations, much like the subject view of an email client.</li>";
$output .= "<li><b>Flat</b> -- Displays the posts in chronological order, in the order in which they are posted.</li>";
$output .= "<li><b>Expanded</b> -- Displays the title and text for each post.</li>";
$output .= "<li><b>Collapsed</b> -- Displays only the title for each post.</li>";
$output .= "</ul>";
$output .= "<p>When a user chooses <i>save settings</i>, the comments are then redisplayed using the user's new choices. Administrators can set the default settings for the comment control panel, along with other comment defaults, in %comment-config.</p>";
$output .= "<p>NOTE: When comment moderation is enabled, users will have another control panel option to control thresholds (see below).</p>";
$output .= "<h3>Additional comment configurations</h3>";
$output .= "<p>Comments behave like other user submissions in Drupal. Filters, smileys and HTML that work in nodes will also work with content. To prevent a single user from spamming the web site with too many comments, administrators can set a comment throttle in %site-config under <i>Submission settings</i>.</p>";
$output .= "<p>Administrators can control access to various comment module functions through %user-permissions. Know that in a new Drupal installation, all comment permissions are disabled by default. The choice of which permissions to grant to which roles (groups of users) is left up to the site administrator.</p>";
$output .= "<p>The following permissions can be enabled for anonymous users, authenticated users, or any other user roles that the administrator chooses to define:</p>";
$output .= "<ul>";
$output .= "<li><b>Access comments</b> -- Allows users to view comments.</li>";
$output .= "<li><b>Administrate comments</b> -- Allows users complete control over configuring, editing and deleting all comments on the site. Best reserved for <b>very</b> trusted users.</li>";
$output .= "<li><b>Moderate comments</b> -- Allows users to rate comment postings (see more on moderation below).</li>";
$output .= "<li><b>Post comments</b> -- Allows users to post comments into an administrator moderation queue. Administrators then post the comment to the site.</li>";
$output .= "<li><b>Post comments without approval</b> -- Allows users to directly post comments. This bypasses the administrator moderation queue.</li>";
$output .= "</ul>";
$output .= "<h3>Notification of new comments</h3>";
$output .= "<p>Drupal provides specific features to inform site members when new comments have been posted:</p>";
$output .= "<ul>";
$output .= "<li>On the home page, Drupal displays the total number of comments attached to each node, and tracks comments read by individual site members. Members which have logged in will see a notice accompanying nodes which contain comments that they have not read.</li>";
$output .= "<li>The <i>tracker</i> module, disabled by default, displays all the site's recent posts. There is a link to the %tracker page in the navigation block. This page is a useful way to browse new or updated nodes and comments. Content which the user has not yet read is tagged with a red star (this graphic depends on the current theme). Visit the comment board for any node, and Drupal will display a red <i>new</i> label beside the text of unread comments.</li>";
$output .= "<li>Some administrators may want to %download-notify, install and configure the notify module. Users can then request that Drupal send them an email when new comments are posted (the notify module requires that cron.php be configured properly).</li>";
$output .= "</ul>";
$output .= "<h3>Comment moderation</h3>";
$output .= "<p>On sites with active commenting from users, the administrator can turn over comment moderation to the community. </p>";
$output .= "<p>With comment moderation, each comment is automatically assigned an initial rating. As users read comments, they can apply a vote which affects the comment rating. At the same time, users have an additional option in the control panel which allows them to set a threshold for the comments they wish to view. Those comments with ratings lower than the set threshold will not be shown.</p>";
$output .= "<p>To enable moderation, the administrator must grant %permission permissions. Then, a number of options in %comment-moderation must be configured.</p>";
$output .= "<h4>Moderation votes</h4>";
$output .= "<p>The first step is to create moderation labels which allow users to rate a comment. Go to %comment-votes. In the <i>vote</i> field, enter the textual labels which users will see when casting their votes. Some examples are</p>";
$output .= "<ul>";
$output .= "<li>Excellent +3</li>";
$output .= "<li>Insightful +2</li>";
$output .= "<li>Caught My Attention +1</li>";
$output .= "<li>Useful +1</li>";
$output .= "<li>Redundant -1</li>";
$output .= "<li>Flame -3</li>";
$output .= "</ul>";
$output .= "<p>So that users know how their votes affect the comment, these examples include the vote value as part of the label, although that is optional.</p>";
$output .= "<p>Using the weight option, you can control the order in which the votes appear to users. Setting the weight heavier (positive numbers) will make the vote label appear at the bottom of the list. Lighter (a negative number) will push it to the top. To encourage positive voting, a useful order might be higher values, positive votes, at the top, with negative votes at the bottom.</p>";
$output .= "<h4>Moderator vote/values matrix</h4>";
$output .= "<p>Next go to %comment-matrix. Enter the values for the vote labels for each permission role in the vote matrix. The values entered here will be used to create the rating for each comment.</p>";
$output .= "<p>NOTE: Comment ratings are calculated by averaging user votes with the initial rating.</p>";
$output .= "<h4>Creating comment thresholds</h4>";
$output .= "<p>In %comment-thresholds, you'll have to create some comment thresholds to make the comment rating system useful. When comment moderation is enabled and the thresholds are created, users will find another comment control panel option for selecting their thresholds. They'll use the thresholds you enter here to filter out comments with low ratings. Consequently, you'll probably want to create more than one threshold to give users some flexibility in filtering comments.</p>";
$output .= "<p>When creating the thresholds, note that the <i>Minimum score</i> is asking you for the lowest rating that a comment can have in order to be displayed.</p>";
$output .= "<p>To see a common example of how thresholds work, you might visit %slashdot and view one of their comment boards associated with a story. You can reset the thresholds in their comment control panel.</p>";
$output .= "<h4>Initial comment scores</h4>";
$output .= "<p>Finally, you may want to enter some <i>initial comment scores</i>. In %comment-inital you can assign a beginning rating for all comments posted by a particular permission role. If you do not assign any initial scores, Drupal will assign a rating of <b>0</b> as the default.</p>";
$output = t($output, array("%comment-config" => l(t("administer") ." » ". t("configuration") ." » ". t("modules") ." » ". t("comment"), "admin/system/modules/comment"), "%site-config" => l(t("administer") ." » ". t("configuration"), "admin/system"), "%user-permissions" => l(t("administer") ." » ". t("accounts") ." » ". t("permissions"), "admin/user/permission"), "%tracker" => l(t("recent posts"), "tracker"), "%download-notify" => "<a href=\"http://drupal.org/project/releases\">". t("download") ."</a>", "%permission" => l(t("moderate comments"), "admin/user/permissions"), "%comment-moderation" => l(t("administer") ." » ". t("comments") ." » ". t("moderation"), "admin/comment/moderation"), "%comment-votes" => l(t("administer") ." » ". t("comments") ." » ". t("moderation") ." » ". t("votes"), "admin/comment/moderation/votes"), "%comment-matrix" => l(t("administer") ." » ". t("comments") ." » ". t("moderation") ." » ". t("matrix"), "admin/comment/moderation/matrix"), "%comment-thresholds" => l(t("administer") ." » ". t("comments") ." » ". t("moderation") ." » ". t("thresholds"), "admin/comment/moderation/thresholds"), "%slashdot" => "<a href=\"http://slashdot.org/\">Slashdot</a>", "%comment-inital" => l(t("administer") ." » ". t("comments") ." » ". t("initial comment scores"), "admin/comments/moderation/roles")));