The Arcive of vBulletin Modifications Site. |
|
Spoiler Tag : Show/Hide Details »»
|
|||||||||||||||||||||||||
A CSS/Javascript based spoiler tag for vB 3.5.x (but I think it must work with earlier versions)
Just follow the instructions below or in the .zip file. I hope you like my first modification! Instructions Step 1. Copy the following into the additional CSS definitions (Admin CP > Styles & Templates > Style Manager > All Style Options>Additional CSS definitions) and paste it into the lower box. Code:
.pre-spoiler {
border: 1px solid #B5C0A8;
margin: 0 15px 5px 15px;
background: #E3E9DB;
padding: 3px 5px 3px 5px;
font-weight: bold;
text-align: right;
color: #6A775B;
}
.spoiler {
background: #E3E9DB;
margin: 0 15px 15px 15px;
padding: 5px;
border: 1px solid #B5C0A8;
}
Now click save and go to the page to add a new BB Code (Admin CP> Custom BB Codes > Add New BB Code) and enter the following: Title: Spoiler Tag: spoiler Replacement: Code:
<div>
<div class="pre-spoiler">
<span style="float:left; padding-top: 2px;">Spoiler</span> <input type="button" value="Show" 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 = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show';}">
</div>
<div>
<div class="spoiler" style="display: none;">{param}</div>
</div>
</div>
Description: Hides text Use {option}: No Button Image: Leave empty Click save and you are done! Known bugs: You can read the spoiler in the "Thread Preview". FAQ Q: I want to change the color that the spoiler tag uses! How? A: If you know CSS it is all controlled in the CSS definitions. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
No problems here.
/me clicks install |
|
#3
|
||||
|
||||
|
ok, I take that back. Whan you do a thread preview, it shows the contents of the spoiler.
|
|
#4
|
|||
|
|||
|
Do you mean the "Hover Preview" from the Treads list? I didn't think of that... If somebody know how to do it... Please say =)
|
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
||||
|
||||
|
Very nice spoiler hack!
|
|
#7
|
|||
|
|||
|
Please change the BB Code with this! Now it works great! (except the Preview, Sorry Stangsta, I will try to fix that)
Code:
<div>
<div class="pre-spoiler">
<span style="float:left; padding-top: 2px;">Spoiler</span> <input type="button" value="Show" 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 = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show';}">
</div>
<div>
<div class="spoiler" style="display: none;">{param}</div>
</div>
</div>
![]() Hack Updated with the new code! |
|
#8
|
|||
|
|||
|
excellent! thank you soo much!
|
|
#9
|
|||
|
|||
|
Quote:
|
|
#10
|
|||
|
|||
|
What do you mean dirtycrow? It's all in english (well, except my posts that are in BAD english).. But the only "English" words that are in the hack are:
- Spoiler - Show - Hide Edit: Sorry dirtycrow... I've just edited my post... It's all in english now... But again, there're only 2 words to change... Sorry!! |
![]() |
|
|