View Full Version : Spoiler tag?
squidsk
10-15-2012, 09:20 PM
Would it be possible to have a spoiler tag added? The reason being that sometimes there's information that isn't relevant to everyone, so having a spoiler type bbcode so that only those that are interested in the content would actually look at it. This has the benefit of having less vertical in pages. I'd find this especially useful for the description post of a mod as certain things, like details of patches, could be spoilered so that the description is kept a reasonable length except for those who want to see the additional details.
Paul M
10-15-2012, 10:42 PM
Well I dont think "Spoiler" would be a very good term for it.
squidsk
10-15-2012, 11:22 PM
Perhaps not, its just what we call one version of the tag that we use on our forum. We also call the other version a content tag.
Lynne
10-16-2012, 03:24 PM
If you put it in code tags, then it is limited to only xxx lines, I believe.
BirdOPrey5
10-16-2012, 05:41 PM
Nested spoiler tags make or interesting "chose your own adventure" type threads. ;)
squidsk
10-19-2012, 07:31 PM
Here's the code my site uses for the spoiler tag:
<div style="margin: 5px 20px 20px;"> <div class="smallfont" style="margin-bottom: 2px;"><b>Spoiler Alert, click show to read:</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" type="button" /> </div> <div class="alt2" style="border: 1px inset ; margin: 0px; padding: 6px;"> <div style="display: none;"> {param} </div> </div> </div>
I think we called it a spoiler tag because you can stick spoilers inside of the tag and its optional as to whether or not people choose to look.
Lynne
10-19-2012, 10:16 PM
Aren't you required to turn off post caching in order to have the tag work?
squidsk
10-20-2012, 12:36 PM
Unless there's a second setting somewhere my site has 14 post caching and the bbcode provided works without any problem.
BirdOPrey5
10-21-2012, 09:09 PM
Aren't you required to turn off post caching in order to have the tag work?
Most spoiler tags I see are just simple javascript- post caching isn't am issue because the same code is always shown.
squidsk
10-21-2012, 09:55 PM
This one is a javascript based tag. You'll see the javascript attached to the onlick event of the input button.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.