PDA

View Full Version : BB Code Enhancements - Classic button Spoiler


Fatal Hazard
03-02-2013, 11:00 PM
This BB Code allows you to show/hide text

Title: Spoiler
BB Code Tag Name: Spoiler
Replacement:
<div style="margin: 5px 20px 20px;"> <div class="smallfont" style="margin-bottom: 2px;"><b>Spoiler:</b>&nbsp; <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>

Example: Some Text
Description: Allows you to hide/show text.

Remove Tag If Empty
Yes

Disable BB Code Within This BB Code
No

Disable Smilies Within This BB Code
No

Disable Word Wrapping Within This BB Code
No

Disable Automatic Link Parsing Within This BB Code
No

If you wish to allow users to have spoilers inside on spoilers then set 'Remove Tag If Empty' to NO. Otherwise leave it as it is.

I will be releasing bigger add ons for vB5 in it's later releases.

ndut
01-11-2014, 01:33 AM
thank you

matheus21
10-17-2014, 02:32 PM
'm new to vbulletin where I lap this code,? version 5.1.3
tanck