Deciding how to handle comments
The Comment module in Backdrop allows users to comment on many types of site content, as allowed by the site administrator.
When Comment module is enabled, users can post comments to discuss Posts and other content. Comments behave like other user submissions. Filters, smileys, and HTML that work in nodes will also work with comments if configured accordingly.
Once enabled, Comments add a form with a textarea field (and save and preview buttons) after the body of the node content. Text submitted into this textarea is saved as a comment attached to this node.
Administering comments in Backdrop
To configure comment settings on a specific Content type:
Navigate to the Content types administration page Admin > Structure > Content types or via URL at example.com/admin/structure/types.
Find the content type you want to enable and click the Configure link to the right of the Content type.
Scroll down and click the Comment Settings tab.
Here you can specify several different settings (some options will not appear until you've selected a certain setting).
Content type comment configuration
Default comment setting for new content
This setting sets the default for the Comment tab in the edit form on new nodes of this type. It does not turn off comments. Even when set to "closed" comments can be enabled for individual nodes using the node edit form. The comment setting on future content of this type will default to:
- Closed - the edit form setting will default to closed.
- Open - the edit form setting will default to open.
Note: this setting is a default, and is not retroactive to existing content of the type.
Comments per page
Specifies the maximum number of comments displayed on one page (additional pages will be added if you exceed this limit).
Show comment replies in a threaded list
When this option is enabled, comments are displayed in a threaded list (replies are indented to make discussions easier to follow).
Allow comment title
When this option is enabled, a user can fill in a title for their comment (the title is optional).
Display pictures for comment authors
If user pictures are enabled, display the picture of the comment author.
Show reply form on the same page as comments
When this option is enabled, the reply form is displayed on the same page as the comments. (If this is not selected, clicking "Reply" will take you to a new page where you can fill in the reply form.)
You can specify whether a preview is "Required" (always be displayed before saving the comment), "Disabled" (never displayed), or "Optional" (the user has the option of displaying a preview).
Note: Be sure to click "Save content type" after configuring the settings.
Enabling and disabling comments for individual content
As noted in the previous section, comment defaults are set per node type, but the settings form for actually turning off (or on) comments remains the node edit form. The node edit form can be found at Content > Add content > [[node type]] or by clicking the Edit tab on any existing content (i.e. the path "node/[[NID]]/edit if you know the node ID of the content).
Under the comment tab for the node edit form there are two options:
- Open - Users with the "Post comments" permission can post comments. The comment form will be visible on the node.
- Closed - Users cannot post comments. The comment form is hidden. Selecting this option reveals a checkbox labeled "Hide existing comments" which if selected will hide both the comment form and any pre-existing comments.
User permissions for comments
To configure user permissions for commenting you must be logged in as an administrative user or as a user with permission to administer comments:
Navigate to the Permissions administration page Admin > Configuration > User Accounts > Permissions or via URL at example.com/admin/people/permissions. In the Comments section, enable or disable the permissions for each role:
- Administer comments and comment settings - allows access to comment approval and administration form.
- View comments - allows the user to view existing comments.
- Post comments - If a user has this and not the "Skip comment approval" permission, their comments will show in the "Unapproved comments" list until someone with the "Administer comments and comment settings" approves them.
- Skip comment approval - if disabled, comments are not published immediately and need to be approved before appearing on the site.
- Edit own comments - this does not allow the user to delete comments, only users with the "Administer comments and comment settings" can delete comments because if comments are threaded, replies to a comment are deleted with it.
Note: Granting anonymous users the permission to post comments can dramatically increase the amount of spam. It is recommended that you set up a spam filtering module such as Honeypot if you choose to allow anonymous comments.
Administering and approving comments
Backdrop provides a central form where all existing comments on the site are listed. This is useful especially in the situation where users have not been granted the Skip comment approval permission since this allows an administrator to decide which comments are allowed before they are published to the site.
Administering published comments
- Navigate to the Comments administration page Admin > Content > Comments or via URL at example.com/admin/content/comment.
- From this "Published comments" page, you can select one or more comments to unpublish or delete using the checkboxes next to each comment (to select all, check the checkbox at the very top of the row).
- Use the dropdown above under "Update Options" to select one of the following options from the list:
- Unpublish the selected comments
- Delete the selected comments
- Click the "Update" button.
Approving unpublished comments
To approve unpublished comments, click the Unapproved Comments tab and follow the above steps, selecting whether you would like to:
- Publish the selected comments
- Delete the selected comments