twentyfourhoursmedia / comments-work
An easy to use comment plugin for Craft CMS 3
Installs: 213
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 2
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
- dev-master
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.14
- 1.1.12
- 1.1.10
- 1.1.9
- 1.1.7
- 1.1.5
- 1.1.0
- 1.0.7
- v1.0.6.x-dev
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.0
- dev-fix/multi-site
- dev-fix/fix-asset-naming
- dev-feature/check-authorized-event
- dev-feature/poll-19-add-indices-to-optimize-the-new-group-by-clauses
- dev-craft34-update
- dev-comments-work-7
- dev-elementquery-support
This package is auto-updated.
Last update: 2025-03-23 17:41:40 UTC
README
An easy to use and straightforward commenting plugin for Craft CMS 3.x. Allow users to post comments to your content, and moderate them from the dashboard.
Documentation
Read all at our online documentation resource
Comments Work Overview
- Add user comments to any type of element, such as users and content items
- Get a nice overview of submitted comments in the CP
- Moderation: delete, approve or mark as spam in the CP
- Moderation: modify comment contents in the CP
- Comment forms are signed so malicious users cannot submit comments to arbitrary content
Usage
Quick example how code would look on the front-end. Read more at:
- https://io.24hoursmedia.com/comments-work/show-comment-entries-on-a-page
- https://io.24hoursmedia.com/comments-work/form
{# @var commentsWork \twentyfourhoursmedia\commentswork\services\CommentsWorkService #}
{% set commentsWork = craft.commentsWork.service %}
<div id="comments">
<br/>
<p>{{ commentsWork.countComments(entry) }} comments</p>
{% set comments = commentsWork.fetchComments(entry, 0, 10) %}
{% for comment in comments %}
{# @var comment \twentyfourhoursmedia\commentswork\models\CommentModel #}
<div class="card card bg-light">
<div class="card-body">
<div class="row">
<div class="col-md-2">
<img src="https://image.ibb.co/jw55Ex/def_face.jpg" class="img img-rounded img-fluid" width="64">
<p class="text-secondary text-center">{{ comment.dateCreated | date }} {{ comment.dateCreated | date('H:i') }}</p>
</div>
<div class="col-md-10">
{%- if comment.user %}<p><a href="https://maniruzzaman-akash.blogspot.com/p/contact.html"><strong>{{ comment.user.friendlyName }}</strong></a></p>{% endif -%}
{%- if comment.title is not empty %}
<p><strong>{{ comment.title }}</strong></p>
{% endif -%}
{%- if comment.comment is not empty %}
<p>
{{ comment | commentAsHtml }}
</p>
{% endif -%}
</div>
</div>
</div>
</div>
<br/>
{% endfor %}
</div>
Requirements
This plugin requires Craft CMS 3.0 or later, and works best with the PRO edition. (Other editions do not support users)
Installation
To install the plugin, follow the instructions at https://io.24hoursmedia.com/comments-work/installation
Configuring Comments Work
There are two configuration options. In the Admin CP, go to 'Settings' -> 'Comments Work'. Read more at https://io.24hoursmedia.com/comments-work/configuration
- 'auto approve comments' - if enabled, comments are shown immediately on the site.This bypasses the moderation. NOT RECOMMENDED WHEN ANONYMOUS COMMENTS ARE ENABLED!
- 'Allow anonymous comments' - allows anonymous users to post comments.
Brought to you by 24hoursmedia