View Full Version : spoiler tags?
9mmPrincess
11-17-2004, 12:14 AM
like they have here: http://forums.televisionwithoutpity.com/index.php?showtopic=3111875&st=45
if you scroll down and read the page a bit you'll see bits of texted that are blacked out-but if you use your mouse to highlight them, it suddenly becomes readable. is there any kind of mod/hack that would do that for vb3?
Michael Morris
11-17-2004, 12:28 AM
First off, this isn't the forum for this. second, it's a fairly simple bb tag you can make
<span style="color=#000000; background=#000000;">{param}</span>
Moved to Modification Requests forum.
sabret00the
11-17-2004, 09:32 PM
the best spoiler tags i've seen are on the animesuki forums
Koutaru
11-20-2004, 08:51 PM
How is their's different?
sabret00the
11-21-2004, 01:50 PM
check this out: http://forums.animesuki.com/showpost.php?p=370075&postcount=44
and then they got the ability to have [spoiler=blah blah] check it here: http://forums.animesuki.com/showpost.php?p=370100&postcount=47
it's a marvelous spoiler tag.
Natch
11-21-2004, 08:53 PM
Bear with me:
* Natch heads to his forum for this BBcode...
OK: I'm back :D
That animesuki forum is using this BBcode: I think I found it on vbt, or here, some somewhere ...
Spolier BBcodes
Name: Spoiler Tags
Tag: spoiler
Replacement: <div style="margin:5px 20px 20px 20px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> <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>Example: Darth Vader is Luke Skywalker's Father
Simple as that :D it's a ver' sexy DOM manipulation, and it's pretty bulletproof...
Code Monkey
11-21-2004, 10:13 PM
That's pretty cool. I did have a problem with it though. When I used preview post, the submit post button no longer worked. :( Looks like a form conflict.
sabret00the
11-21-2004, 10:36 PM
works perfectly, anyway to get it to work with and without the {option} mine only works one way or the other :(
just encountered that bug but it took alot for me to ge there, but it's there :(
Natch
11-21-2004, 11:21 PM
Above is edited with the bug fixed: I had not noticed that bug before... the form tags are not required for htis to work...
Natch
11-21-2004, 11:24 PM
works perfectly, anyway to get it to work with and without the {option} mine only works one way or the other :(
just encountered that bug but it took alot for me to ge there, but it's there :(
How or when would you use the option tag, sabe?
EDIT: just re-read your post... I'll have a crack at it...
Natch
11-21-2004, 11:36 PM
I think that maybe you have to have two tags? one with option on, and one with it off?
It's wierd that it won't behave just like other tags in that way?
sabret00the
11-22-2004, 12:23 AM
is a shame, i'm wondering if they hardcoded it also? maybe might be the way to fix it, i'll look at the include bbcode file see what i come up with :)
Michael Morris
11-22-2004, 12:48 AM
This is kinda neat - I'll give it a trial run see how the users react.
Code Monkey
11-22-2004, 04:13 AM
Then there is this one (http://www.vbulletintemplates.com/mods/showthread.php?t=5832).
Freezerator
11-22-2004, 05:59 AM
This is the one i use :
Spoiler
Your message in a message text here
<center><table width="80%"><TR><TD bgcolor="#FFFFFF"><font color="black" size="1">Spoiler: (select this text to read it)</font><br><font color="#FFFFFF" size="2"><blockquote>Your message in a message text here</blockquote></font></td></TR></TABLE></center>
Spoiler: (select this text to read it)
Your message in a message text here
N/A [Edit] [Delete]
Code Monkey
11-23-2004, 08:46 PM
I've played with the code a bit. I think this looks nicer than having an empty box. Plus it has less divs.
<div>
<input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].style.display = ''; this.parentNode.parentNode.getElementsByTagName('d iv')[2].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('d iv')[2].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler'; }" />
<div id="spoiler" style="display: none;margin: 0px; padding: 6px; border: 1px inset;width:560px">
{param}
</div>
<div style="display:block; font-style:italic;font-size:x-small;">
Click the "Show Spoiler" Button to reveal hidden text.
</div>
</div>
sabret00the
11-29-2004, 07:10 AM
is a shame, i'm wondering if they hardcoded it also? maybe might be the way to fix it, i'll look at the include bbcode file see what i come up with :)
hardcoded it, if anyones interested in it, then let me know and i'll release it :)
Gaim Mastr
12-24-2004, 04:18 PM
Thanks for the animesuki used spoiler code, Natch !!
It's the best one I've ever seen; and I've implemented it onto the 3DGamers.com forums just now. :up:
Sin City
02-19-2005, 08:49 AM
thanks for sharing the code Natch... best spoiler code i have seen yet
Die2Night
08-30-2006, 12:05 PM
I was looking for something likw this ....installed
R1lover
09-18-2006, 03:21 AM
Sweet,very nice, but if there are two in the same post it causes an issue.
Example:
Quoting someone who used the spoiler code and then you using it too.
it would look like this.
Sweet Rinn, I also changed the style a bit... I like this better
123456789
test double quote
Here is what I used because it will work with multiple tags in one post.
<div style="margin:5px 20px 20px 20px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b>
<input type="button" value="Show" style="width:45;font-size:10px;margin:0px;padding:0px; height:21" 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: 0px; border: 0px inset;">
<div style="display: none;">
{param}
</div>
</div>
</div>
rowlandc
02-06-2007, 12:09 PM
I'm not very experianced with the codes yet. Could someone please tell me where I'm supposed to add this code to get it to work.
Thank You
dahdoh
02-06-2007, 12:51 PM
so i wanna it without viewing the hide icon after i press on
how can i make it like that i wanna olny 1 button ?(show)
rowlandc
02-09-2007, 10:17 AM
Sorry I thought I had done it but then i realized it was the wrong thing. Could someone please tell me where I should put this code to get it to work.
Thank You
Cyricx
02-09-2007, 12:42 PM
Go to your Admincp -> Custom BB Codes -> Add New BBCode
Then follow Natches instructions above to fill out for the various fields :)
rowlandc
02-12-2007, 10:09 AM
I've found this code in a source code on www.narutofan.com:
What would I have to change so I can use it?
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b>: <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>
<div style="display: none;">
Its pretty much Hannibal having a tragic past in WWII against the Nazis. A tale about his love for his baby sister, revenge against those that killed her through cannibalism. His early methods of killing, taste for human flesh, his early days of interest in the human body as a student. With a sprinkle of Japanese background taught by his aunt. He goes revenge ninja style on one guy.
</div>
</div>
</div></div>
The source code come from http://forums.narutofan.com/showthread.php?p=6980150#post6980150
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.