MyBB Community Forums

Full Version: Set A Code For This
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want these HTML codes to be able to be like so:

[mod][/mod] is the black one
[Becca][Becca] is the pink
[Xawk][/Xawk] is the purple one

How do I hard code them so whatever I put in the BBCode, the message appears like so?

[Image: 52e9db923995910a7b4749c3b246def9.png]

The link to the https://pastebin.com/46iiMiTT
Please help me!!

For bigger image: https://i.gyazo.com/52e9db923995910a7b47...46def9.png
This would need a custom BB Code plugin, where you can define new BB codes. I guess, MyBB has one.
(2017-06-20, 05:26 PM)meetdilip Wrote: [ -> ]This would need a custom BB Code plugin, where you can define new BB codes. I guess, MyBB has one.

Where would that plugin be?

EDIT: Trying to figure out how to use MyCode. How would I set the message in between the two BBCodes to show up? And how would I set the HTML to appear?

Bumpetity bump.

BUMP
You can define it using css class with mycode, Like expression: \[mod\](.*?)\[/mod\]
replacement: <div class='yourstyle'><span>Moderator Notes</span></div><div class='your calss'>$1</div>

You can learn how to make it work with the help of above example.
(2017-06-21, 03:49 PM)Dark-Power-Invader Wrote: [ -> ]You can define it using css class with mycode, Like expression: \[mod\](.*?)\[/mod\]
replacement: <div class='yourstyle'><span>Moderator Notes</span></div><div class='your calss'>$1</div>

You can learn how to make it work with the help of above example.

This doesn't define the css.....
(2017-06-21, 05:22 PM)SquidCat Wrote: [ -> ]
(2017-06-21, 03:49 PM)Dark-Power-Invader Wrote: [ -> ]You can define it using css class with mycode, Like expression: \[mod\](.*?)\[/mod\]
replacement: <div class='yourstyle'><span>Moderator Notes</span></div><div class='your calss'>$1</div>

You can learn how to make it work with the help of above example.

This doesn't define the css.....

Sure it does, right here: class="yourstyle"
(2017-06-21, 05:27 PM)Michael2014 Wrote: [ -> ]
(2017-06-21, 05:22 PM)SquidCat Wrote: [ -> ]
(2017-06-21, 03:49 PM)Dark-Power-Invader Wrote: [ -> ]You can define it using css class with mycode, Like expression: \[mod\](.*?)\[/mod\]
replacement: <div class='yourstyle'><span>Moderator Notes</span></div><div class='your calss'>$1</div>

You can learn how to make it work with the help of above example.

This doesn't define the css.....

Sure it does, right here: class="yourstyle"

It shows the class, but where do I define the CSS for the style?
In custom.css ( ? )
(2017-06-22, 02:06 AM)SquidCat Wrote: [ -> ]
(2017-06-21, 05:27 PM)Michael2014 Wrote: [ -> ]
(2017-06-21, 05:22 PM)SquidCat Wrote: [ -> ]
(2017-06-21, 03:49 PM)Dark-Power-Invader Wrote: [ -> ]You can define it using css class with mycode, Like expression: \[mod\](.*?)\[/mod\]
replacement: <div class='yourstyle'><span>Moderator Notes</span></div><div class='your calss'>$1</div>

You can learn how to make it work with the help of above example.

This doesn't define the css.....

Sure it does, right here: class="yourstyle"

It shows the class, but where do I define the CSS for the style?

Simple, put it in global.css as, for example

.yourstyle {
Font-size:14px;
}
If you got your answer you can mark your thread as solved. If not you can share additional details and we will try to help you out.