Very nice. I have seen many requests for this.
Thanks
This is by far the most useful BB code I have ever used. It is used heavily on every one of my forums, including dev forums. It's a javascript spoiler.
Title: Spoiler
Tag: Spoiler
Replacement:
Example: [spoiler=Episode 2]He Gets Killed![/spoiler]Code:<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b> for <i>{option}</i>: <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;"> {param} </div> </div> </div>
Description: Use this to hide important information which might spoil a movie, program, etc for other users.
Use {option}: Yes
Screenshots
Example code:
Spoiler in its closed state:
Spoiler when open
Images CAN be hidden within this![]()
Very nice. I have seen many requests for this.
Thanks
I think someone, semann I think it was, posted something like this in his bb codes thread.
You are correct. As with everything, there is more then one way to skin a cat. Both are very good ways to get the job done.
Yes, I use that, maybe a bit different. My code is this:
Code:<div style="margin:5px 20px 20px 20px"> <div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> <input type="button" value="Mostra" style="width:80px;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 = 'Nascondi'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostra'; }"></div> <div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> {param} </div> </div>
... but do any of these methods work with the thread preview?
hmm. i can't quite get this to work either. i'm running 3.6.2 maybe i don't have something checked or turned on to get it to work?
Wonderful bit of code, works great!
Nice thread! but i don't know where can i put it in?
I have a question.
Can I have multipe tags to make the spoiler work?
For instance, presently its
[spoil=Puzzle] Answer to Puzzle [/spoiler]
I would prefer an additional tags, being:
[spoiler] Whatever [/spoiler]
Or for posters to have the option and put:
[spoiler=Lotto Numbers] 32 45 89 [/spoiler]
If they want to.
Is this possible?
AO
Thanks I just installed this now and it works very nicely
One of the best Spoiler codes I have seen.
There are currently 1 users browsing this thread. (0 members and 1 guests)