Last updated January 27, 2010. Created by sepeck on April 27, 2008.
Edited by silverwing, dbeall, LeeHunter, MGParisi. Log in to edit this page.

Comments have to be enabled and have permissions

To enable comments Goto: admin/build/modules/list(Administer > Site building > Modules > List) in the "Core - optional" subsection.
To set permissions Goto: admin/user/permissions(Administer > User management > Permissions) in the "comment module" subsection. You have four permission options and they can be configured by role as well:

  • access comments - for users to see them.
  • administer comments - allows deleting and editing comments.
  • post comments - is self explanatory
  • post comments without approval - see notes below

Post comments without approval will publish the comment as soon as it's saved. If this one is not allowed, the comments will be in queue waiting for administrator approval.

Comments approval queue
Goto: admin/content/comment/approval(Administer > Content management > Comments > Approval queue).
The comments can be viewed, edited, deleted or approved for publishing.

View the comments that are published on the site
Goto: admin/content/comment/new(Administer > Content management > Comments > Published comments)
There you will find the entire list of "all" comments that are published. Comments that are waiting in the approval queue will not show in the list until they have been approved.

Content type settings for comments

  1. Goto: admin/content/types/list(Administer > Content management > Content types).
  2. Click a content type.
  3. In the Comment Settings subsection are the following settings.
  • Default comment setting:
    • Disabled
    • Read only
    • Read/Write

    If comments are disabled, no comments will be visible. Set to Read only effectively locks a given thread. Read/Write allows comments to continue by users with appropriate rights.

  • Default display Mode:
    • Flat list - collapsed
    • Flat list - expanded
    • Threaded list - collapsed
    • Threaded list - expanded

    Collapsed or Expanded?
    * Collapsed breaks every comment out onto its own page. It makes it hard to follow the conversation. Clicking the title loads the page with the comment.
    * Expanded displays the entire comment as is used here on Drupal.org.

    Flat or Threaded list?
    * Flat List displays all comments in order, which is much simpler.
    * Threaded means comments are connected or threaded to each other. They are not in chronological order.

    What to use? The choice is yours. However, 'Flat list - expanded' is generally the easiest for users and the conversation is easy to follow.

  • Default display order:
    • Date - newest first
    • Date - oldest first

    The default is set to 'newest first'.
    Here on Drupal, 'oldest first' is used for comments, issue queue and forums. The choice is there and you can change it at any time without loosing any comments.

  • Default comments per page:
    • Select list: 10, 30, 50, 70, 90 and so on.

    When the number of comments exceeds the selection a pager will display.
    Small number means a faster page load. If you use oldest first, you might set this value as high as possible. So that all the comments will be listed on a single page.

  • Comment controls:
    • Display above the comments
    • Display below the comments
    • Display above and below the comments
    • Do not display

    It depends on your website's users. If they are web savvy, consider allowing them controls. If you display the controls, each user can set it to their preference. A 'Save settings' or submit button is displayed with the selections.
    * For most cases use 'Do not display' is the safest, so users can't destroy the settings you have done.

  • Anonymous commenting:
    • Anonymous posters may not enter their contact information
    • Anonymous posters may leave their contact information
    • Anonymous posters must leave their contact information

    If set to 'may not' the E-mail field is hidden. Set to 'may' leave contact information, the E-mail field is displayed but not required. If set to 'must' leave contact information, the 'E-mail' field is required when posting.
    * If you use the Gravatar module, the email field is used to display the users gravatar with their comment. Your global theme settings have to allow 'user pictures in comments'. For that to work the visitor also has to have a gravatar.com account. Having a gravatar is gaining popularity.

  • Comment subject field:
    • Disabled
    • Enabled

    Comments are usually quite short, so there may be no need to complicate things by requiring a subject. Drupal uses it for comments, and in many other places. If you would like your comment threads to look better, consider requiring a subject.

  • Preview comment:
    • Optional
    • Required

    From security's point of view, it is a good defense against spammers to require preview. From a usability standpoint it is just an additional click and a page view, but some users may get confused.

  • Location of comment submission form:
    • Display on separate page
    • Display below post or comments

    It depends on the design of your website. If longer pages are no problem, use 'Display below post or comments'. This displays the name, e-mail, homepage, subject and comment fields below the last comment. The nice part of doing it this way is the user stays on the page and can read all the comments above while posting. And many people will post a comment if the form is right there with out clicking 'reply' or 'add new comment'.

Additional notes
• User involvement can be enhanced using subscriptions and/or the Comment Notify module which will send the user an email when a reply is posted. The module provides a check box(yes/no) and two options when a comment is posted.
• Another neat module is Comment RSS to provide a feed of the comments. This feed from this module can also be used to send the comments to twitter using twitterfeed.com, a free service.
• If you want users to upload attachments to the comments we have the Comment Upload module. This module also has a file path setting for each content type, very cool.

• Try to have comments as easy as possible for visitors and users without opening the door to the spammers, because spammers will fill page after page with their links. At the same time we all would like our visitors and users to get involved with the conversation.

• Consider using Mollom or the Captcha module to help keep the spammers at bay.

Good luck to everyone and we hope to see a lot of great comments on your web site !

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

Comments

How can I change "Default comments per page" array to my own. What hook I need to use, if it needed?
hook_form_FORM_ID_alter(&$form, &$form_state)
with FORM_ID = node_type_form
and hook = module_name
$form doesn't contain this value

We've been using Drupal for many years now and only recently have created a new content type that we'd like to use Comments for. I had disabled comments site-wide so this is my first dip into the comments feature.

This article helped a lot however I still could not get the comment form to appear on content I'd already created for this new content type.

After a bit of research I discovered that if comments were previously disabled, then they are disabled per node for each content type as well (makes perfect sense). What I had to do is edit each node I had already created in this new content type (fortunately it was only a few) and manually enable the Comment settings on a node-by-node basis to get the comment feature to appear on the new content type.

It's been so long since I originally built my site in Drupal....I was pulling my hair trying to figure this out -- I feared that in my early days I had hacked core to disable comments LOL

Hope this helps someone. If you are enabling Comments for a content type that you've already made many, many nodes in, then see this post on how to run a database query to enable comments on existing nodes: http://drupal.org/node/1275628#comment-4973566

BigMike

That solved my issue :)

BC

I don't have all of those options in my Comment Settings area. The only options I have are "Default comment setting for new content," Comments per page," Anonymous commenting," and "Preview comment." I am missing the other ones that you mentioned above such as Default display Mode, Default Display Order, Comment Controls, and Location of comment submission form.

I ask if there is a way to have in my content type "news" two different comments.
Like "agree" and "disagree".
I like my visitors to comment a different comment. The editors have to put the first comment so the users can reply.
Is that possible?
And how?