Spoiler Inside Spoiler


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: [Download] [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: [Download] [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!

Subject: Re: Spoiler Inside Spoiler
Run this in you ACP :wink:

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


Code of reemplaze HTML:

Code: [Download] [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

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


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.0636s (PHP: 28% SQL: 72%)
SQL queries: 11 - Debug Off - GZIP Enabled