Spoiler Inside Spoiler »  Show posts from    to     

Icy Phoenix


phpBB 3 MODS And Styles (Not Compatible With phpBB 3.1) - Spoiler Inside Spoiler



leonidfg [ Sat 12 Apr, 2008 04:03 ]
Post subject: Spoiler Inside Spoiler
Hi!!!...

I have a forum phpBB3 converted from phpBB2.

All the functions wortk properly, the forum runs great.

But I wanted to put a BBCode Spoiler.

I search in google and others communities and found this:
Code: [Hide]
  1. <div style="padding: 3px; background-color: #FFFFFF; border: 1px solid #d8d8d8; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span 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.innerHTML = '<b>Spoiler: </b><a href='#' onClick='return false;'>Ocultar</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href='#' onClick='return false;'>Mostrar</a>'; }" /><b>Spoiler: </b><a href="#" onClick="return false;">Mostrar</a></span></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div> 


Good. The BBCode works fine. The thing that I want to this bbcode do is that I can put a spoiler inside another one.

I probed with another one. This:
Code: [Hide]
  1. <div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Mostrar" 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 = 'Ocultar'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div> 


But, it's the same that the first one. No spoiler inside spoiler can be achieved with those two.

I hope you can help me, this is an important modification for the web.

Bye!


JHOSMAN [ Sun 13 Apr, 2008 22:44 ]
Post subject: Re: Spoiler Inside Spoiler
Run this in you ACP :wink:

BBCODE:
Code: [Hide] [Select]
[spoiler]{TEXT}[/spoiler]


Code of reemplaze HTML:

Code: [Hide] [Select]
<div style="margin:20px; margin-top:5px"><div class="quotetitle"><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="quotecontent"><div style="display: none;">{TEXT}</div></div></div>


Demo:
http://musica.kokforos.com/viewtopic.php?f=7&t=15


leonidfg [ Wed 16 Apr, 2008 06:47 ]
Post subject: Re: Spoiler Inside Spoiler
Thanks Jhosman... but it doesn't work. I clean up the cache after adding it but still the same problem. The spoiler works fine, but to put an spoiler inside another one doesn't work...

I really need this...

Bye




Powered by Icy Phoenix