Spoiler Tags with Title
#1
Regular Expression:
\[spoiler=(.*?)\](.*?)\[/spoiler\]

Replacement:
<tag><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b>: $1 <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;">
$2
</div>
</div>
</div>
</tag>

Just do something like this:

[spoiler=Information from the new CoroCoro Magazine]
Information Here
[/spoiler]
Reply
#2
CoroCoro Big Grin

This is neat, thanks!
Reply
#3
Cool. Thank you (:
Reply
#4
Testing....
vBulletin/Wordpress/Magento/MyBB
Developer and Designer
Reply
#5
doesn't work :/, if someone could fix it. it would be awesome!
Reply
#6
It works for me. Are you sure you pasted the right code?
Reply
#7
my fault, used the code wrong to post with.
Reply
#8
Could you add some screenshot/preview? Thanks.
Reply
#9
Works...
vBulletin/Wordpress/Magento/MyBB
Developer and Designer
Reply
#10
Very nice code :D
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)