MyBB Community Forums

Full Version: MyCode WhiteBox?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, how i can do a MyCode that show a white box like <divbox="white">?
Thanks for a reply
To do it you have to go to ACP -> Configuration -> MyCode -> Add New MyCode and in Regular Expression you put for example .whitebox (if you want an empty box) or \[whitebox\](.*)\[/whitebox\] (if you want a box where you can put text). Then, in Replacement you put the HTML code, e.g.
<div class="whitebox"></div>
To put a text into the box you can use
<div class="whitebox">$1</div>
After that you press the Save MyCode button and go to Templates & Style -> Themes -> your theme -> global.css -> Edit Stylesheet: Advanced Mode and at the bottom of it you put your class e.g. .whitebox.
You can of course use any other text instead of whitebox, it's only my suggestion.

Based on this thread