MyBB Community Forums

Full Version: [Help] spoiler in spoiler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, all of MyBB MasterBlush

I need a help, I'm trying insert spoiler in my forum, I use this code in mycode:

Regular Expression:
\[spoiler\](.*?)\[/spoiler\]

Replacement:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><strong>Spoiler : </strong>&nbsp;<input type="button" value="Show" style="width:60px;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="trow2" border="1" style="margin: 0px; padding: 6px; border: 1px inset; background:#eee;">
<div style="display: none;">$1</div>
</div>
</div> 

I want to insert "spoiler in a spoiler", like this:

[spoiler]
tesspoiler
[spoiler]tesspoiler[/spoiler]
[/spoiler]


but it doesn't work, and you can see here:
[Image: ?di=8NK7]

Would You help me? I've tried to search a sollution for this problem in this forum, but I can't found it..

Sorry for my english :p

Thank you
this simple method should work : copy spoiler mycode to another tag AND use both like this :

[spoiler1]tesspoiler
[spoiler2]tesspoiler[/spoiler2]
[/spoiler1]
ok, thank a lot master ranjani Smile
by the way, what if I want to use one code but can include both? if possible?
I ever see that method in here,

http://pixopetz.com/forum/showthread.php?tid=1

it's possible to do that..
^ let me congratulate you for the Advanced Spoiler plug-in Smile