MyBB Community Forums

Full Version: Custom MyCode For Images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need a custom MyCode that does not have an end tag and will replace the tag with whatever I want.

For example, if I put:
[warn]

It would be replaced with an image that says that the user has been warned for the post that it was placed in.

Please make it obvious where I put whatever I want to have to replace the tag in the code.

I have a feeling that I didn't explain this well enough, so if you need clarification just let me know.

Thanks in advance!
Hello.

Regular Expression:
 \[warn\]

Replacement:
<div style="padding: 5px; border: 1px solid black; color: white; background: gray;">User was warned for this post.</div>

For the replacement, you can use whatever you want in terms of HTML. I just added a div with some decent styling, that's completely editable.
Thank you for this Smile
You may want to have this be a plugin to the parser because otherwise anyone will be able to know the user was warned, not just staff.
The point of this is so all the users can know about it. Kind of like making an example of what not to do.