sgalinski / sg-comments
Threaded Comments & Moderation - Threaded TYPO3 comment system with replies, moderation, notifications, file uploads, and sg_news integration.
Package info
gitlab.sgalinski.de/typo3/sg_comments.git
Type:typo3-cms-extension
pkg:composer/sgalinski/sg-comments
Requires
- sgalinski/sg-apicore: ^3.1
- sgalinski/sg-captcha: ^1.0
- sgalinski/sg-mail: >=8.4.7
- typo3/cms-backend: ^14.3.0
- typo3/cms-core: >=14.3.0 <=14.3.99
- typo3/cms-extbase: ^14.3.0
- typo3/cms-fluid: ^14.3.0
- typo3/cms-frontend: ^14.3.0
Requires (Dev)
None
Suggests
- sgalinski/sg-account: Adds a better handling for recieving profile images and when sending notifications
Provides
None
Conflicts
None
Replaces
- sgalinski/sg_comments: 9.2.0
- dev-master
- 9.2.0
- 9.1.7
- 9.1.6
- 9.1.5
- 9.1.4
- 9.1.3
- 9.1.2
- 9.1.1
- 9.1.0
- 9.0.10
- 9.0.9
- 9.0.8
- 9.0.7
- 9.0.6
- 9.0.5
- 9.0.4
- 9.0.3
- 9.0.2
- 9.0.1
- 9.0.0
- 8.4.7
- 8.4.6
- 8.4.5
- 8.4.4
- 8.4.3
- 8.4.2
- 8.4.1
- 8.4.0
- 8.3.1
- 8.3.0
- 8.2.0
- 8.1.5
- 8.1.4
- 8.1.3
- 8.1.2
- 8.1.1
- 8.1.0
- 8.0.15
- 8.0.14
- 8.0.13
- 8.0.12
- 8.0.11
- 8.0.10
- 8.0.9
- 8.0.8
- 8.0.7
- 8.0.6
- 8.0.5
- 8.0.4
- 8.0.3
- 8.0.2
- 8.0.1
- 8.0.0
- v7.x-dev
- 7.2.3
- 7.2.2
- 7.2.1
- 7.2.0
- 7.1.7
- 7.1.6
- 7.1.5
- 7.1.4
- 7.1.3
- 7.1.2
- 7.1.1
- 7.1.0
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- v6.x-dev
- 6.0.26
- 6.0.25
- 6.0.24
- 6.0.23
- 6.0.22
- 6.0.21
- 6.0.20
- 6.0.19
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- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.5.0
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- dev-fix_security_audit
This package is auto-updated.
Last update: 2026-12-04 22:23:50 UTC
README
License: GNU GPL, Version 2 Repository: gitlab.sgalinski.de/typo3/sg_comments
About
sg_comments is a powerful, threaded comment system for TYPO3. It supports replies, moderation, email notifications
via sg_mail, and file uploads. It is also the underlying comment system for sg_news.
Installation
- Install the extension via composer:
composer require sgalinski/sg-comments - Include the static TypoScript template "Comment System" in your root template.
- If you use
sg_news, ensure its static template is loaded beforesg_comments. - Configure the extension via TypoScript (see below) or in the extension configuration.
Integration
ViewHelper Usage
The easiest way to integrate a comment thread is using the CommentThreadViewHelper:
{namespace sgc=SGalinski\SgComments\ViewHelpers}
<sgc:commentThread commentType="pages" threadPrefix="my-unique-prefix"/>
Arguments
commentType(string): The type of comments (default:pages).threadPrefix(string): Unique identifier for the thread.notify(bool): Enable the "Notify me" feature.fileUpload(bool): Enable file uploads.respectLanguage(bool): If true, only comments in the current language are shown.enableReplies(bool): Allow users to reply to comments.loginRequired(bool): Only logged-in users can post comments.disableModeration(bool): Skip the moderation queue.newCommentsOnTop(bool): Show newest comments at the beginning.
TypoScript Libraries
For integration in Fluid or TypoScript:
lib.sgCommentsIndex: Renders the full comment thread.lib.sgCommentsNew: Renders only the comment form.lib.sgCommentsGetCount: Returns the total comment count.lib.sgCommentsGetCountWithLabel: Returns the count with a localized label.lib.sgCommentsGetAverageRating: Returns the average rating (if enabled).
Example:
<f:cObject typoscriptObjectPath="lib.sgCommentsIndex"/>
JavaScript Initialization
To initialize the frontend components (replies, uploads, lightbox), import and call the initialization in your main JavaScript entry point:
import SgComments from 'EXT:sg_comments/Resources/Public/JavaScript/sgComments.js';
SgComments.init();
Frontend API
The frontend widgets use public sg_apicore routes. Custom integrations should generate URLs with the
api:uri.api ViewHelper and use JSON requests for comment creation and subscriptions. Uploads remain multipart form
data with the file in the files field. See UPGRADE.md for the endpoint list and migration payload.
Configuration
The extension setting showDisplayCommentSectionOptionOnPageSettings exposes Render the comment section
only on sg_news news pages, in the existing General tab after the news tags.
Global Settings (TypoScript)
You can customize the behavior in plugin.tx_sgcomments.settings:
plugin.tx_sgcomments.settings {
# Require moderation for new comments
moderateNewComments = 1
# List of moderator email addresses
moderators = moderator@example.com
# Date format in frontend
relativeDate.absoluteFormatFallback = %d.%m.%Y
# File upload settings
fileUpload {
enabled = 1
amountOfFiles = 5
maxfileSize = 10 # in MB
fileTypes = jpg, png, pdf
}
}
E-Mail Templates (sg_mail)
This extension uses sg_mail for all notifications. The templates are registered automatically and can be edited in the
Mail Templates backend module.
Available Templates:
- approved: Sent to the author when a comment is approved.
- commentators: Sent to users who subscribed to a thread.
- declined: Sent to the author when a comment is rejected.
- disapproved: Sent when a previously approved comment is hidden.
- moderator: Sent to moderators when a new comment is posted.
Common Markers:
{USERNAME}: Author of the comment.{COMMENT}: The comment text.{LINK_TO_COMMENT}: Link to the specific comment in the frontend.{DATE}: Creation date.
Backend Module
The Comments backend module allows editors to moderate, view, and delete comments across the entire TYPO3 instance. The list shows author details (including creation date and rating), comment preview, approval, record visibility and record actions. Search matches the comment text, author name and email address; the approval filter limits the list to approved or unapproved comments. Reset clears both filters. Selecting a site root lists comments from its page tree; selecting an individual page lists its comments. The site overview links to readable comment pages; unavailable pages are identified by their page ID. Approval and record visibility are shown separately: withdrawing approval changes moderation, while TYPO3's hide/enable control changes the record's hidden state independently. The moderation dialog also shows both states.
Use Show full text to expand a preview, or click the comment to edit it. Editing and moderation remain primary actions. More options contains visibility, deletion, information and history controls, subject to TYPO3's normal permissions.
The moderation dialog contains only the current approval or withdrawal action and an optional email notification. Approval notifications go to the author and thread subscribers. Withdrawal notifications go to the author; a reason field appears only when notification is selected. The reason is optional.
Deletion has its own confirmation dialog opened from More options. It retains TYPO3's deletion warnings. Without notification, the standard TYPO3 deletion process is used. Opting into an email notification uses the existing author notification and deletion flow, with an optional reason. No email is sent unless selected.
Sort order supports newest/oldest first, author A–Z/Z–A and unapproved/approved first. Newest first is the default. The order is stable across pagination, including comments with matching dates or authors. Pagination supports direct page selection and 1–100 comments per page; press Enter or use the refresh button to apply changes. Filters, sorting and page size are remembered for the backend user. Use Apply filters to update the list. Reset filter clears search and approval filters and restores newest first. Comment edit links, control buttons, and context-menu actions open TYPO3's contextual record editor in a sidebar.
Backend advertisements
Advertisement data, the ViewHelper, JavaScript and their tests are synchronized from sgc-scripts.
Edit the central sources and run sgc syncBackendAdvertisements sg-comments to update them.
Campaigns for loaded TYPO3 extensions are excluded; no notice is shown when none remain eligible.
The backend notice promotes related sgalinski extensions. Dismissing it hides notices from this extension for three days
in the same browser, across tabs and logins, using localStorage. The duration defaults to
DEFAULT_DISMISS_FOR_SECONDS in the advertisement script; a positive dismissForSeconds partial argument overrides it.