View Full Version : BB Code Enhancements - Spoiler BB Code with Show/Hide Button
Deadly Stream
07-08-2008, 10:00 PM
Due to this (http://www.vbulletin.com/forum/showthread.php?363883-Internet-Brands-claims-against-Xenforo) I have decided to leave the vBulletin community and no longer wish to have my work associated with it.
Apologies to those who use this work.
Q-v-n-s-Q
07-09-2008, 08:02 PM
not bad, another bbcode tag??, thank you for the mod
Karri
07-09-2008, 09:24 PM
Um.... Did you "decided to make [your] own" or did you lift this bb code off my forum (which happens to be well established and the same subject as yours) and pass it off as your own work? The code you posted is identical to the BB Code on my site.
Charlie98902
07-09-2008, 11:36 PM
Sorry to hear it is identical code but is there a screen shot of it hidden and unhidden? I have been looking for something like this.
sava700
07-10-2008, 01:06 AM
Ok, i've got a code similar to this for my youtube wraps but I've got a button to add the code around the text I highlight.....is there a button for this to use other than typing [spoiler] etc around the text?
For some reason the only thing that shows up when I click on the show button is Hide text (the phrase in the div part).
What am I doing wrong?
sava700
07-10-2008, 11:57 PM
For some reason the only thing that shows up when I click on the show button is Hide text (the phrase in the div part).
What am I doing wrong?
nothing, I have the same problem with it too.... something is missing or whatever from the code.
Suggestions to fix and suggestions to my question earlier please?
Tulsa
07-11-2008, 12:27 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=110598" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=110598</a>
Works perfectly on 7.2 and I've been using this one since 3.5
KatieG
07-11-2008, 05:51 AM
https://vborg.vbsupport.ru/showthread.php?t=110598
Works perfectly on 7.2 and I've been using this one since 3.5
Me also
cclaerhout
07-11-2008, 07:46 AM
This kind of code had already been posted a long time ago on vbulletin.com ^^
Skyrider
07-11-2008, 11:46 AM
For some reason the only thing that shows up when I click on the show button is Hide text (the phrase in the div part).
What am I doing wrong?
Same for me, and I'm using 3.7.1
agitated
07-11-2008, 06:23 PM
find:
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> Hide Text </div> </div> </div>
replace with:
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;">{param}</div> </div> </div>
or replace Hide Text with {param}
HTH
Zacarias
07-11-2008, 10:26 PM
Works like a charm with agitated's edit. :D
agitated
07-12-2008, 09:58 AM
Um.... Did you "decided to make [your] own" or did you lift this bb code off my forum (which happens to be well established and the same subject as yours) and pass it off as your own work? The code you posted is identical to the BB Code on my site.
It would appear as if that may be true Karri.
Certainly is one reason why {param} is missing as it would not show on the page source.
students_forum
09-22-2008, 06:48 PM
this won't work for firefox 3, am I the only to realise?
Seshat Diva
12-31-2008, 04:55 PM
Easy to follow, successfully installed.
My members will enjoy having this feature.
Thanks so much for creating easy to follow steps!
Vaupell
12-31-2008, 09:51 PM
tx for the fix,, the param at the end needs to be closed to work missing a } at the end of param. else works fine,
marked installed
VargTimmen
01-04-2009, 01:58 PM
This is the fixed replacement code:
<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px"> <u>Spoiler</u>: <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('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'; }"> </div> <div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;">{param}</div> </div> </div>
giankar
01-13-2009, 04:46 PM
Can I hide spoiler content from being viewed by visitors?
JαρŘα?σoζ
11-06-2009, 03:10 AM
Nice modification...
Anyway, how about if I want to add a custom header?
The code:
1 2 3
The result:
Spoiler for Test:
<--The Text-->
Can anyone help me with this? Thanks...
JαρŘα?σoζ
11-06-2009, 03:17 AM
Nice modification...
Anyway, how about if I want to add a custom header?
The code:
1 2 3
The result:
Spoiler for Test:
<--The Text-->
Can anyone help me with this? Thanks...
Got it !!!
<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('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'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{param}
</div>
</div>
</div>
Gator Bite
12-08-2009, 11:56 PM
Just installed this. It works just the way I was hoping.
Your code is missing the closing } after "{Param". Just a heads up.
Nook_Neformat
03-21-2010, 11:06 PM
anyone knows how to make spoiler work with rss?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.