Last updated April 6, 2012. Created by jbrauer on May 26, 2005.
Edited by shamio, silverwing, add1sun, Amazon. Log in to edit this page.

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, story, collaborative book page, etc. An administrator can give comment permissions to user groups, and users can (optionally) edit their last comment, assuming no others have been posted since.

User control of comment display

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:

  • Threaded — Displays the posts grouped according to conversations and subconversations.
  • Flat — Displays the posts in chronological order, with no threading whatsoever.
  • Expanded — Displays the title and text for each post.
  • Collapsed — Displays only the title for each post.

When a user chooses save settings, 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 administer » comments » configure. NOTE: When comment moderation is enabled, users will have another control panel option to control thresholds (see below).

Additional comment configurations

Comments behave like other user submissions in Drupal. Filters, smileys and HTML that work in nodes will also work with comments. Administrators can control access to various comment module functions through administer » access control » permissions. 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. The following permissions are available in Drupal 5:

  • Access comments — Allows users to view comments.
  • Administer comments — Allows users complete control over configuring, editing and deleting all comments.
  • Post comments — Allows users to post comments into an administrator moderation queue.
  • Post comments without approval — Allows users to directly post comments, without the administrator having to publish the comments.

Notification of new comments

Drupal provides specific features to inform site members when new comments have been posted.

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 they have not read. Some administrators may want to install a comment notification module (a table comparing some of these modules is available here). Users can then request that Drupal send them an e-mail when new comments are posted (the notify module requires that cron.php be configured properly).

The tracker module, disabled by default, displays all the site's recent posts. There is a link to the recent posts 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 "new" label beside the text of unread comments.

Looking for support? Visit the forums, or join #drupal-support in IRC.