logo
Submitted by Mikhail Ismajlov on Wed, 07/10/2019 - 12:28

Drupal 8 already has Comment module in core, you just need to enable it:

comment module

All comments can be viewed on the Manage - Content — Comments:

comment

Now we can include comments for each Content Type separately. Let's go to the Manage - Structure - Content Types, выберим Content Type Article и перейдем во вкладку Manage Fields:

commentcomments

Add a comment field and save:

commentscommentscomment

Let's see what settings the comments have.You can choose the default value for comments. Next is a tick Threading, if it is selected, the comments will go a hierarchical list with indents to the left, if the comment is the answer to another comment. If not ticked, comments will go simply and without indents.After that you can adjust the number of comments per page.

commens

If there are more comments than this number, a paginator will appear to go to the next page of comments. Preview comment means this button:

preview

You can uncheck this box so that the Subject field is not displayed, then the comment subject will be taken from the beginning of the comment text.
Show the response form on the same page as the comments; if you uncheck this box, a link will appear to add a comment instead of the comment form on the page.

Setting permissions to add comments
You can also customize who can add comments and who can edit them. To do this, go to the page to edit permissions for user role roles Menu - People — Permissions:

access rights

I think everything should be clear and without explanation, cut Adding comments without checking. This refers to a check by the administrator of the site, that is, the user adds a comment, but the comment is not published immediately, but only by the administrator or moderators (who has access to manage comments).