Big Beautiful BBCode
Last updated: November 28, 2019 (Current version: 2.9.6 - "Michelangelo TMNT")
Further down in this post you will find detailed instructions. But first so that you have an idea of what BBCodes are included, here are the codes you get with this extension (this list also shows which require a closing BBCode tag and which do not):
- [pop] (popup)
- [red][/red] (also orange, yellow, green, blue, purple)
- [hl][/hl] (highlight)
- [kbd][/kbd] (html keyboard tag)
- [space][/space] (sometimes you need an extra line break)
- [background][/background] (added directly from s9e TextFormatter)
- [font][/font] (added directly from s9e TextFormatter)
- and table bbcode ([table],[thead],[tbody],[th],[tr],[td]) (added directly from s9e TextFormatter)
Also, remember, Flarum already has a core BBCode extension which is why this extension doesn't include any basics such as,
[b]bold[/b], or other basic codes. This extends the core BBCode extension. Here are the BBCodes already included with Flarum core:
[b], [i], [u], [s], [url], [img], [email], [code], [quote], [list], [del], [color], [center], [size], [*]
composer require zerosonesfun/bbbbcode
composer update zerosonesfun/bbbbcode
2) Deactivate and reactivate the extension in your admin. This refreshes important files.
3) Go to your dashboard, click tools, click clear cache.
4) Clear your browser cache, and any other caches like Cloudflare, if applicable.
composer remove zerosonesfun/bbbbcode
The following BBCodes are available:
[tooltip="your tip here" placement="right"]word[/tooltip]
(for "placement" you may use: top, bottom, left, right)
[spoiler="Text you click on"]What you will see after clicking.[/spoiler]
Or, if you omit the “spoiler=“ part (the title) then the title of your spoiler will default to “Read More.”
(Hover over, or if on mobile tap, to reveal.)
[blur]This is what happens at the end of the movie.[/blur]
[accordion header="YOUR HEADER TEXT"]The text that is hidden at first but then appears goes here[/accordion]
[accordion header="YOUR NEXT HEADER TEXT"]The text that is hidden at first but then appears goes here[/accordion]
(repeat the accordion BBCode as many times as needed)
[chat-a="Why did the chicken cross the road?" who="Me"]
[chat-b="It was hungry?" who="Mary"]
[chat-a="No! Wrong!" who="Me"]
(repeat as many times as needed alternating chat-a and chat-b)
("space" BBCode at end of chat is optional - it adds some extra space)
[action]Walks into a wall[/action]
(Image enlarged to show spinning asterisks. It’s a new take on the old chat room action format.)
[pop button="Click Here" title="Hello" content="Thank you for being a friend."]
(By the way, the button you see here to close the popup... That's pretty much what the button looks like that you click on with your custom text to open the popup.)
Quick font colors & highlighter
New as of version 1.1.6 there are now quick font color codes and a highlight code. Yes, with the standard BBCode without this extension you can change font colors. But, these equal less keystrokes. So, it's a little faster to make a word red for example compared to the standard way.
[red]text here[/red]... other colors available: [orange], [yellow], [green], [blue], [purple]
[hl]highlight this text[/hl]
(That's a "L" not a 1. It's hl for highlight.)
[audio mp3="song.mp3" ogg="song.ogg"]
[audio mp3="song.mp3" width="50"]
(You may put a mp3 and ogg file together for maximum browser compatibility, or just post a mp3, ogg, wav, flac, webm, or m4a file alone. Also, as the last example shows, you may modify the width. The width will become a percentage and by default, if you choose not to declare a width, the player will be 100% width.)
Note: This audio BBCode is compatible with my SM2 audio extension. Feel free to use both! But, of course you would not want to use this plus my separate audio BBCode add-on. That would just add the audio BBCode code twice.
KBD (HTML Keyboard tag):
Please type [kbd]breathe[/kbd] in your reply.
Background, Font, Table:
For now I am not adding screenshots of these three. These are pretty basic and added directly from s9e TextFormatter.