承接 wszdb/flarum-autolock 相关项目开发

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

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

wszdb/flarum-autolock

Composer 安装命令:

composer require wszdb/flarum-autolock

包简介

Automatically lock discussions after reaching a specified number of posts

README 文档

README

License Flarum PHP Version

🔒 Automatically lock discussions when they reach a specified number of posts.

🔒 Flarum 贴子自动锁定插件,设置后,某个贴子回复数量超过特定楼层时,自动锁定,同时支持对特定标签(Tags)锁定豁免.

✨ New in v2.4.0

  • 🏷️ Tag Exemption: Configure specific tags to be exempt from auto-locking
  • 🎛️ Multi-Tag Support: Select one or multiple tags for exemption
  • 🌐 Enhanced UI: Intuitive tag selector in admin panel

Features

  • Automatic Locking: Discussions are automatically locked when reaching the configured post count
  • 🏷️ Tag Exemption: Exempt specific tags from auto-locking (NEW in v2.2)
  • ⚙️ Configurable Threshold: Set custom post count threshold in admin panel (default: 100)
  • 🎛️ Enable/Disable Toggle: Easy on/off switch in admin settings
  • 🌍 Multi-language Support: English and Simplified Chinese included
  • 🚀 Event-Driven: Uses Flarum's native event system for optimal performance
  • 🔧 Zero Configuration: Works out of the box with sensible defaults
  • 📊 Detailed Logging: Comprehensive logs for debugging and monitoring

Installation

Install via Composer:

composer require wszdb/flarum-autolock

Enable the extension:

php flarum extension:enable wszdb-autolock

Clear cache:

php flarum cache:clear

Configuration

  1. Navigate to Admin PanelExtensions
  2. Find Auto Lock extension
  3. Click Settings button
  4. Configure options:
    • Enable Auto Lock: Toggle to enable/disable the feature
    • Post Count Threshold: Set the number of posts after which discussions will be locked (minimum: 1, default: 100)
    • Exempt Tags: Select tags that should be exempt from auto-locking (NEW in v2.2)

How It Works

Post Count Calculation

The extension uses the following formula to calculate total posts:

Total Posts = comment_count (replies) + 1 (original post)

Example:
- Original post = Floor 1
- 99 replies = Floor 2-100
- Total = 100 floors

When total >= threshold → Auto lock ✅

Tag Exemption (v2.2)

Discussions with exempt tags will never be auto-locked, regardless of post count:

  1. Admin selects exempt tags in extension settings
  2. When a post is published, the extension checks discussion tags
  3. If any tag matches exempt list → Skip auto-lock
  4. Otherwise → Apply normal threshold logic
局部截取_20251012_114438

Trigger Logic

  1. When a new post is published, the extension listens to the Posted event
  2. It refreshes the discussion data and calculates total posts
  3. Checks if discussion has any exempt tags (v2.2)
  4. If total posts ≥ threshold and discussion is not locked, it locks the discussion
  5. All actions are logged for monitoring

License

This extension is licensed under the MIT License.

Links

Developed by wszdb

wszdb/flarum-autolock 适用场景与选型建议

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

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

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

围绕 wszdb/flarum-autolock 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-07