Knowledgebase

How to manage Drupal comments

Drupal comes prepackaged with a Comment module which is enabled by default and which adds a comment functionality to your Drupal site. Whether comments can actually be submitted depends on the permissions of the user roles, on the global settings of the content type in question, and on the settings of the particular content item (node). From the preconfigured roles, administrators can do anything, authenticated/registered users can post and view comments, and anonymous users (visitors) can only view comments. From the preconfigured and enabled content types, the article content type is open to comments by default.

You can edit, unpublish, publish and delete all the comments that have been posted on your site from the admin panel. After you log in, click on the Content tab in the toolbar, and on the page that opens click on the Comments sub-tab (it's at the top right corner of the page). On the following page you'll see all the published comments. You can use the Update Options drop-down menu to unpublish or delete them. To do this mark the checkbox in front of the comment(s), select the desired option from the drop-down menu, and click on the Update button. To edit the content of a comment just click on the edit button for the particular comment. If there are any unpublished/unapproved comments, click on the small Unapproved comments button that's in the upper right corner of the page, and on the next page use the Update Options drop-down menu to publish them, or to delete them permanently.

You can edit the comment permissions for the user roles, so that you can give more or less privileges to one or more roles. To do this, click on the People tab in the toolbar and on the page that opens click on the Permissions sub-tab. On the following page you'll find the permissions for all the roles listed under Comment. Edit them the way you want them to be and click on the Save permissions button.

You can also change the comment settings for the content types. To edit the global settings click on the Structure tab in the navigation bar, on the page that is displayed click on Content types, and on the following one on the edit button for the particular content type. On the page with the settings that opens scroll down to the bottom and click on the Comment settings section on the left. This will display the comment settings for that content type. You can enable or disable the comment functionality, you can select the number of comments per page, you can enable/disable the comment title, etc. After you're done with the changes click on the Save content type button. The changes will apply both to existing publications of that content type and to future ones. The exception is the option for enabling and disabling comments, which if changed, will apply only to future publications (nodes).

If you want to change that setting for existing publications, you have to edit the settings of the particular node(s). To do this, click on the Content tab in the navigation bar, on the page that opens click on the edit button for the particular node, then scroll to the bottom of the page and click on Comment settings. This will allow you to disable or enable the comment function for that particular node.

For screenshots and some more details you can also check out the Drupal Comments Tutorial.

Was this answer helpful?

 Print this Article

Also Read