syntaxoutlaw/threadify
Composer 安装命令:
composer require syntaxoutlaw/threadify
包简介
A Flarum extension that adds threaded discussions with visual indentation to your forum, making complex conversations easier to follow.
README 文档
README
A Flarum extension that adds threaded discussions with visual indentation to your forum, making complex conversations easier to follow.
🚀 Features
- Multi-level nested threading with distinct colors and indentation for each depth
- Pre-computed thread structure - efficient backend thread calculation and storage
- Real-time updates - new replies appear in correct threaded positions instantly
- Seamless integration - uses existing Flarum mentions
- Works on existing discussions - will also create threads for past discussions
- Optional tag-based threading - thread all discussions, or only those with a chosen tag (e.g. for Q&A-style tags)
📋 Requirements
- Flarum v1.8.10+ (tested on 1.8.10)
- Flarum Mentions Extension - Required for threading to work
- PHP 7.4+
👀 Preview:
🔧 Installation
Via Composer (when published)
composer require syntaxoutlaw/threadify
Manual Installation
- Clone/download this repository into your
extensions/threadify/directory - Run
composer installin the extension directory - Run
cd js && npm install && npm run buildto compile JavaScript - Enable the extension in your Flarum admin panel
🎯 How to Use
Threading works automatically using Flarum's mentions extension:
- Click Reply on any post
- Keep the @ mention that's automatically inserted (e.g.,
@"Username"#p123) - Write your reply and submit
- Your reply will appear indented under the parent post
⚙️ How It Works
Backend (PHP)
- Database Structure:
- Adds
parent_idcolumn to posts table for basic parent-child relationships - Creates
threadify_threadstable for advanced thread metadata (depth, path, counts)
- Adds
- Thread Processing:
- Listens for new posts and extracts parent relationships from mention format
@"Name"#p123 - Pre-computes thread depth, path, and descendant counts for efficient frontend rendering
- Maintains thread hierarchy with proper indexing for fast queries
- Listens for new posts and extracts parent relationships from mention format
- API Endpoints:
/discussions/{id}/threads- Returns complete thread structure with metadata/threadify/admin/rebuild-parent-ids- Admin tool for rebuilding thread relationships
Frontend (JavaScript)
- Thread Tree Building:
- Uses pre-computed thread metadata from backend API
- Builds parent-child tree structures and flattens them to linear threaded order
- Visual Styling:
- Applies CSS classes for visual depth styling (
thread-depth-1,thread-depth-2, etc.) - Progressive indentation with color-coded depth indicators
- Applies CSS classes for visual depth styling (
🔍 Troubleshooting
- Threading not working? Ensure
flarum/mentionsextension is enabled - Posts not loading? Check browser console for errors and run
php flarum cache:clear - Visual issues? Run
php flarum assets:publishand clear browser cache - Database issues? Run
php flarum migrateto ensure all migrations are applied
📝 License
MIT License - see LICENSE file for details.
Made with ❤️ for the Flarum community
syntaxoutlaw/threadify 适用场景与选型建议
syntaxoutlaw/threadify 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 1.97k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 07 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「forum」 「extension」 「nested」 「discussions」 「threading」 「flarum」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 syntaxoutlaw/threadify 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 syntaxoutlaw/threadify 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 syntaxoutlaw/threadify 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
A Laravel 5 package providing a solid foundation for building discussion forums
A frontend for riari/laravel-forum providing views written with Bootstrap 3
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
UI Kit 3 Extension for Yii2
统计信息
- 总下载量: 1.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-28
