承接 sgalinski/sg-comments 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sgalinski/sg-comments

Composer 安装命令:

composer require sgalinski/sg-comments

包简介

Threaded TYPO3 comment system with replies, moderation, notifications, file uploads, and sg_news integration.

README 文档

README

sgalinski Logo

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

  1. Install the extension via composer:
    composer require sgalinski/sg-comments
    
  2. Include the static TypoScript template "Comment System" in your root template.
  3. If you use sg_news, ensure its static template is loaded before sg_comments.
  4. 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();

Configuration

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. It provides filters for approval status and nesting levels.

sgalinski/sg-comments 适用场景与选型建议

sgalinski/sg-comments 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sgalinski/sg-comments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sgalinski/sg-comments 我们能提供哪些服务?
定制开发 / 二次开发

基于 sgalinski/sg-comments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 17
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-07-18