MyBB Central

Full Version: Custom MyCode for Moderation Comment
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I'd like to make a custom MyCode that I would use to format the comments I add when I moderate a post. I'd like this to work in the same way [code] and [quote] work, meaning I could edit body and header of my [mc] in the Additional CSS section of my themes.

Is that even possible? How should I proceed? Can somebody give me a embryo of what the code should look like and where I should put it?

Thanks in advance!
For those of you interested, I think I found the right solution:

In the custom MyCode settings:
- Regular expression:
Code:
\[mc="(.*?)"\](.*?)\[/mc\]
- Replacement:
Code:
<div class=mc_header>$1</div>
<div class=mc_body>$2</div>

And in Additional CSS:
Code:
.mc_header {
    background: #DDDDDD;
    border: 1px solid #DDDDDD;
    border-bottom: 0;
    color: #000000;
    font-weight: bold;
    margin: 8px auto 0 auto;
    padding: 4px;
}

.mc_body {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    border-top: 0;
    color: #000000;
    padding: 4px;
    margin: 0 auto 8px auto;
}

Thanks myself! ^^