定制 happytodev/blogr-comments 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

happytodev/blogr-comments

Composer 安装命令:

composer require happytodev/blogr-comments

包简介

Comment system for Blogr CMS — threaded comments, moderation, voting, anti-spam, and notifications

README 文档

README

Latest Version Tests PHP Version Total Downloads GitHub Stars License

A full-featured comment system for Blogr CMS — threaded comments, moderation, voting, anti-spam, email notifications, and a complete Filament admin interface.

Features

🔧 Core

  • Threaded comments — Nested replies with configurable depth (1–10 levels) and dedicated partials for each level
  • Markdown formatting — Bold, italic, code blocks (with syntax highlighting via scrivo/highlight.php), inline code, links, H2
  • Live preview — See formatted content before posting
  • Character counter — Configurable max length (default 5000) with real-time countdown
  • Toolbar — Bold, italic, H2, link, code block, preview buttons (safe Markdown subset)

🛡️ Moderation & Anti-spam

  • 3 moderation modes — Pre-moderation (all pending), post-moderation (auto-publish), trust system (auto-trust after N approved comments)
  • Multi-layer anti-spam — Cloudflare Turnstile (free, invisible), StopForumSpam API (free), Akismet API (paid, optional), local keyword/link filters
  • Rate limiting — Per-IP throttling for comments (configurable per hour) and votes (per minute) via dedicated middleware
  • Admin moderation — Approve, reject, mark as spam, or delete individually or in bulk
  • Email-based quick moderation — Signed URL approve/reject links in notification emails

📬 Notifications

  • New comment alert — Notify site owner on every new comment (or daily digest or weekly digest)
  • Reply notification — Possibility to auto-notify parent commenter when someone replies, with opt-out link
  • Comment subscriptions — Auto-subscribe on comment for reply notifications
  • Daily digest — Configurable email digest of pending comments

🗳️ Voting

  • Up/down voting — IP + User-Agent based anti-doublon protection
  • Denormalized scorevote_score column on comments for fast sorting
  • Sort options — Newest, oldest, best (by score)

⚙️ Filament Admin

  • Comment Resource — Full list/view with status filters, visible/invisible toggle
  • Dashboard widget — Pending comments count with quick link to moderation list
  • Settings page — All configuration UI (moderation, notifications, anti-spam, rate limits, nesting depth, display options)

🌍 Frontend Display

  • Syntax highlighting — Server-side code highlighting with language badge, dark mode support
  • Per-comment permalink — 🔗 button copies sharable URL with #comment-{id} anchor
  • Smart anchor scrolling — Dynamic scroll offset accounts for fixed/sticky navigation and mobile viewport
  • Comment count on articles — Shows count in card date line and article metadata (configurable)
  • Gravatar support — Automatic avatars via email MD5 hash
  • Multilingual — Complete EN, FR, ES, DE translations for frontend, admin, and email templates

🔌 Extension Points

  • BlogrExtension interface — Registers as blogr-comments extension, respects enable/disable state
  • FilamentPlugin — Auto-registers resource, settings page, and widget in the panel

Requirements

  • PHP ^8.3
  • Blogr ^1.3
  • Laravel ^12.0
  • Filament ^4.0

Installation

composer require happytodev/blogr-comments

Run the migrations:

php artisan migrate

Configuration

Publish the config file:

php artisan vendor:publish --tag=blogr-comments-config

Anti-spam (Turnstile)

Get your free Turnstile keys from Cloudflare Turnstile and add to your .env:

TURNSTILE_SITE_KEY=your_site_key
TURNSTILE_SECRET_KEY=your_secret_key

Anti-spam (Akismet — optional)

AKISMET_API_KEY=your_akismet_key

Usage

Frontend

Comments automatically appear at the bottom of each blog post. No additional setup needed.

Admin — Moderation

Navigate to Comments in your Filament admin sidebar to:

  • View all comments sorted by status
  • Filter by status (pending, approved, rejected, spam)
  • Approve, reject, or mark as spam (individual or bulk)
  • View comment details with full metadata

Admin — Settings

Go to Comments → Settings to configure:

  • Moderation mode (pre/post/trust)
  • Email notifications (owner + replies + digest)
  • Anti-spam providers
  • Rate limits
  • Nesting depth
  • Display options (comment count on articles)

Testing

vendor/bin/pest

Changelog

Please see CHANGELOG for more information.

License

The MIT License (MIT). Please see LICENSE for more information.

happytodev/blogr-comments 适用场景与选型建议

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

它主要适用于以下技术方向: 「blog」 「comments」 「filamentphp」 「blogr」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-11