A Flarum extension. Create custom BBCode, link recognition, and automatic media embedding rules, powered by s9e TextFormatter.
This extension was developed with AI assistance. Custom rendering rules can load third-party content, so administrators should review the service provider's privacy policy before enabling them.
- Includes Bilibili, YouTube, Vimeo, Spotify and NetEase Cloud Music media embed rules, disabled by default.
- Includes Notice, Collapser, and KDB BBCode rules, disabled by default.
- Create, edit, reorder, enable, disable, delete, and test custom BBCode and media embed rules in the administration dashboard.
- Create a composer button and default inserted content for each BBCode.
| Flarum version | Extension version | Branch |
|---|---|---|
| 2.x | 2.x |
2.x |
Install with Composer:
composer require ffans/bbcode-studio
php flarum cache:clearEnable the extension in the Flarum Dashboard.
composer update ffans/bbcode-studio
php flarum migrate
php flarum cache:clear- Custom BBCode
- Custom BBCode rules define an s9e TextFormatter usage and rendering template, which are compiled and checked before saving.
- Custom BBCode roots receive
BbcodeStudio-bbcodeandBbcodeStudio-bbcode-{tag}classes for custom styling. - Custom BBCode can configure default tag attributes inserted by its composer button.
- Media embeds
- Automatically detect URLs and convert them into iframes or other embedded media based on rules.
- Media embeds define PHP PCRE-based rules that extract resource identifiers from URLs, along with player dimensions.
- Media roots receive
BbcodeStudio-mediaandBbcodeStudio-media-{tag}classes for custom styling. - Recognition rules extract resource identifiers directly from URLs, so you can't use a short link like
b23.tv, which have no video identifier in the slug. - Once a media embed is enabled, matching links in posts are automatically converted into responsive players. BBCode usage can also be enabled separately.
- Media rules can configure iframe attributes:
allowfullscreensupports forms with or without a value, whileallow,referrerpolicy, andscrollingrequire values.
To help translate this extension, visit Weblate.
