Topic: Mod: Add [spoiler] tag
I saw another post in here in regards to adding a spoiler tag so I went and used some code I found and modded it to my liking.
Demo: http://forums.programming-designs.com/v … p?pid=4248
Instructions
Step 1. Open parser.php
Step 2.
Find:
'[img]$1[/img]',
After add:
'[spoiler]',
'[/spoiler]',
Step 3.
Find:
'#\[email=([^\[]*?)\](.*?)\[/email\]#',
After add:
'#\[spoiler\](.*?)\[/spoiler\]#',
Step 4.
Find:
'<a href="mailto:$1">$2</a>',
After add:
'<div class="spoiler" onmouseover="this.style.height=\'auto\';" onmouseout="this.style.height=\'20px\';"><b>Spoiler:</b> <i>Hover to reveal text</i><br /><br />$1</div>',
Step 5. Upload parser.php
Now for each style sheet you'll need to add the following:
.spoiler{
height: 20px;
overflow: hidden;
border: 1px solid #ccc;
background-color: #fafafa;
}
DIV.spoiler {MARGIN: 5px 15px 15px 15px; PADDING: 8px}
All done. Hope you enjoyed