treeslins / reply-to-see
Hide content until users reply to the discussion. A Flarum extension supports 2.0.
Package info
github.com/treeslins/reply-to-see
Type:flarum-extension
pkg:composer/treeslins/reply-to-see
v2.0.5
2026-05-12 19:50 UTC
Requires
- php: ^8.1
- flarum/bbcode: ^2.0.0
- flarum/core: ^2.0.0
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