MyBB Community Forums

Full Version: Kyuubi's MyCodes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here's some MyCodes that I made on my vBulletin forum but decided to convert over to MyBB. Smile

Spoiler
Title: Spoiler
Description: Creates a spoiler box for hiding information.
MyCode Pattern:
\[spoiler\](.*?)\[/spoiler\]

HTML Replacement:
<div><div style="margin-bottom:2px; font-size: 12px"><b>Spoiler</b>: <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">$1</div>
</div></div>

Staff MyCode
Title: Staff MyCode
Description: A code that Staff can use to show moderative action!
MyCode Pattern:
\[mod\](.*?)\[/mod\]

HTML Replacement:
<style type="text/css">.moderator {color: #465584;   background-color: #FAFCFE;   border-left: 4px solid #b28383;   border-right: 1px dotted #000;   border-top: 1px dotted #000;   border-bottom: 1px dotted #000;   padding: 4px;   padding-left: 25px;   background: #FAFCFE url(http://s5.tinypic.com/2pzguf5.jpg) center left no-repeat;   margin: 0px auto 8px auto;}</style>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="smallfont"><strong>Moderated Message:</strong></span></td>
</tr>
<tr>
<td class="moderator"><span style="font-weight: bold;"><span style="font-style: italic;"><span style="color: orange;">$1</span></span></span></td>
</tr>
</table>

I'll add more when I've made some. Smile
Thay are the easy ones.
how do we use these?
You go to ACP -> Configuration -> MyCodes (on left sidebar) -> Add New MyCode
In the fields provided, copy/paste the above.

You have to do them one at a time.
Updated, since the regex was wrong.
Some screenshoots of how the MyCodes look like would be nice.
The tinypic image for moderation code has been removed. Reupload the image please.
How about replacing it with a small icon?