Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 3.71 KB

File metadata and controls

72 lines (49 loc) · 3.71 KB

FFans BBcode Studio

License Flarum Latest Version Release Date Total Downloads Monthly Downloads

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.

Preview

preview

Features

  • 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.

Requirements

Flarum version Extension version Branch
2.x 2.x 2.x

Installation

Install with Composer:

composer require ffans/bbcode-studio
php flarum cache:clear

Enable the extension in the Flarum Dashboard.

Updating

composer update ffans/bbcode-studio
php flarum migrate
php flarum cache:clear

For Use

  • 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-bbcode and BbcodeStudio-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-media and BbcodeStudio-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: allowfullscreen supports forms with or without a value, while allow, referrerpolicy, and scrolling require values.

Translations

To help translate this extension, visit Weblate.

Links

License

MIT