Back to vBulletin 3.6 Template Modifications

Special Spoiler
Mod Version: 1.01, by Derek Chai

This modification is in the archives.
vB Version: 3.6.x Rating: (0 vote - 0 average) Installs: 5
Released: 18 Jun 2008 Last Update: Never Downloads: 4
Not Supported  

PLEASE CLICK

Since nobody would do it for me I have coded it myself. First go add a new BBCode

Title:
Code:
Spoiler
BB Code Tag Name
Code:
Spoiler
Replacement:
HTML Code:
<script language='JavaScript' type='text/javascript'>
        <!--
            function spoiler(obj)
            {
                  for (var i = 0; i < obj.childNodes.length; i++)
                  {
                        if (obj.childNodes[i].id == 'idTitle')
                            titleRow = obj.childNodes[i];
                    if (obj.childNodes[i].id == 'idSpoiler')
                    {
                        if (obj.childNodes[i].style.display != 'none')
                        {
                            obj.childNodes[i].style.display = 'none';
                            titleRow.innerHTML = '&nbsp;<b>Click to show spoiler</b>';
                        }
                        else
                        {
                            obj.childNodes[i].style.display = 'block';
                            titleRow.innerHTML = '&nbsp;<b>Click to hide spoiler</b>';
                        }
                    }
                }
            }
        //--></script>
<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;">&nbsp;<b>Click to show spoiler</b></div><div id="idSpoiler" style="display: none;">{param}</div></div><br />
Example:
Code:
[spoiler]Derek rules![/spoiler]
Description:
Code:
Creates and hides text.
Remove Tag If Empty: Yes

DEMO: http://forum.i628.net/showpost.php?p=12&postcount=3 (If it's down it's probably due to host problems. Please look at screenshot instead if down.

Download

No files for download.

Screenshots

Click image for larger version
Name:	spoiler.jpg
Views:	272
Size:	12.8 KB
ID:	82463  

Similar Mods

BB Code Enhancements Special Spoiler vBulletin 3.7 Template Modifications
Special Spoiler vBulletin 3.5 Template Modifications

vblts.ru supports vBulletin®, 2022-2024