treeslins/reply-to-see
最新稳定版本:v2.0.5
Composer 安装命令:
composer require treeslins/reply-to-see
包简介
Hide content until users reply to the discussion. A Flarum extension supports 2.0.
README 文档
README
A Flarum 2.x extension that hides content until users reply to the discussion.
Features
- Hide content using
[REPLY]...[/REPLY]BBCode tags - Automatic reveal after user replies
- Editor toolbar button for easy insertion
- Role-based access control
- Customizable placeholder text
- Server-side filtering for security
- Full i18n support (English, Chinese)
Requirements
- Flarum 2.0.0+
- PHP 8.1+
Installation
composer require treeslins/reply-to-see
Usage
In the post editor, wrap content you want to hide in BBCode tags:
This is public content visible to everyone.
[REPLY]This content will only be visible after the user replies![/REPLY]
Configuration
- Go to Admin Dashboard
- Find "Reply To See" in Extensions
- Configure settings:
- Placeholder text
- Enable/disable
Permissions
post.PassReplyToSee- Users with this permission can view hidden content without replying
Compatibility
| Component | Version |
|---|---|
| Flarum Core | ^2.0.0 |
| PHP | ^8.1 |
Development
# Install dependencies npm install # Build frontend assets npm run build # Watch for changes during development npm run dev
File Structure
reply-to-see/
├── composer.json # PHP dependencies
├── extend.php # Extension entry point (Flarum 2.x Extender API)
├── js/
│ ├── package.json # JS dependencies (TypeScript + Webpack)
│ ├── forum.ts # Forum frontend (Mithril.js)
│ └── admin.ts # Admin panel (Mithril.js)
├── less/
│ └── forum.less # Styles
├── locale/
│ ├── en.yml # English translations
│ └── zh.yml # Chinese translations
└── src/
├── Access/
│ └── PostAccess.php # Permission checks (Flarum 2.x API)
├── Api/
│ ├── ConfigureTags.php # BBCode config
│ └── FilterPostContent.php # Content filtering
└── Listener/
└── AddClientAssets.php # Asset loading
Security
Content is filtered on the server side to prevent users from bypassing restrictions by viewing page source.
License
MIT
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-12