PDA

View Full Version : Spoiler Tag


TruthElixirX
12 Jan 2006, 22:19
This is a (mostly) CSS based spoiler tag for vB 3.5 RC 3 and up (Perhaps lower, but not tested.) Just follow the instructions below or in the .zip file. Have fun!


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.

CSS Code:

.spoiler
{
background: Black;
color: Black;
border-style: dashed;
border-color: White;
}

Step 2.

Now click save and go to the page to add a new BB Code (Admin CP> Custom BB Codes > Add New BB Code)

Enter the following (Exactly as shown!):

Title: Spoiler

Tag: spoiler

Replacement:
<center><font color="red">Spoiler Below</font></center> <div class="spoiler">{param}</div>

Example: test

Description: Hides text

Use {option}: No

Button Image: Leave empty

Click save and go try it out!

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. If you do not know CSS let me know in the thread at vb.org and I'll see if I can help you.

Q: Why doesn't the example work in the admin cp?

A: I'm not sure, but it will still work in posts.



If there are any problems please report them in this thread. I'll try to help all I can.

EDIT:: .zip and code posted above edited for spelling mistakes.

Screenshots added.

Dan
12 Jan 2006, 22:20
Awsome thanks :)

croportal
12 Jan 2006, 23:00
can u provide some screenshots

thanks

TruthElixirX
12 Jan 2006, 23:11
Screenshots added.

croportal
12 Jan 2006, 23:13
what this exactly doing

TruthElixirX
12 Jan 2006, 23:23
The user puts texthere and it hides the text that is in the spoiler tags until it is high lighted.

EasyTarget
12 Jan 2006, 23:46
awesome, I had this installed as bbcode that I found as vbulletin.com but it only workes cuz I have a board with a black background.. if I use a diff style you can see the spoiler, so I'll give this a shot.

EasyTarget
12 Jan 2006, 23:49
if people are wondering what's the point, its so you can have a thread and talk about movie plots/spoilers of recently released movies, or jokes that make them read the joke part first.

I'm sure there's plenty of other uses too, but that's what I use it for.


*edit*
since we're talking bbcode, does anyone have a link to some good bbcode lists?

Corriewf
13 Jan 2006, 01:36
Good job!

The Chief
13 Jan 2006, 01:37
great addition chris, good job!! :)

dirtycrow
13 Jan 2006, 01:50
how about if you don't want any border you hint that there is hidden text?

i would prefer if it was just a link that when you click on it the text (or picture via IMG code) is shown below. I've seen this on freephpbb as "reveal hidden content"

DJ XtAzY
13 Jan 2006, 02:52
nice but i have the spoiler hack that requires the member to click a button to view a spoiler.... like "Show Spoiler" and when clicked, the msg shows

TruthElixirX
13 Jan 2006, 03:01
To get rid of the border use this CSS code instead of the other one:


.spoiler
{
background: Black;
color: Black;
}

JsnakeJ
13 Jan 2006, 05:31
Nice work, I'll probably install it soon.

puertoblack2003
13 Jan 2006, 23:40
awesome, I had this installed as bbcode that I found as vbulletin.com but it only workes cuz I have a board with a black background.. if I use a diff style you can see the spoiler, so I'll give this a shot.

yes you can change the color's plus i used the old spoiler.gif to make it easy to use it also i changed the border styles...like it

Julie
14 Jan 2006, 00:15
Thanks for this!

TruthElixirX
14 Jan 2006, 02:46
Don't forget to click install. :)

ZombieAndy
10 Mar 2006, 19:33
ive installed this but now im getting this in every post

var cssList = new Array(); getCSS("3053751")
var cssList = new Array(); getCSS("3053751")

the spoiler code i added was

.spoiler
{
background: #222244;
color: #222244;
border-width: 1px;
border-style: solid;
border-color: White;
}

G_Man
11 Mar 2006, 02:32
Very Fun!! Thanks.

*clicks install*

TruthElixirX
11 Mar 2006, 02:34
ive installed this but now im getting this in every post

var cssList = new Array(); getCSS("3053751")
var cssList = new Array(); getCSS("3053751")

the spoiler code i added was

.spoiler
{
background: #222244;
color: #222244;
border-width: 1px;
border-style: solid;
border-color: White;
}


You have touched something with the PHP, this modification has not touched the PHP. I'm sorry... But I can't help you. Did you recently do something else to the code?

Also don't forget to click install if you installed the hack.

Darkfire122333
11 Mar 2006, 04:26
What hack are u using for the longevity and stuff in yer postbit?

pbw
11 Mar 2006, 08:13
Darkfire - http://www.vbulletin.org/forum/showthread.php?t=93831

Darkfire122333
11 Mar 2006, 16:32
Thank you.

Aesma Deva
13 Mar 2006, 14:20
For the admin CP problem, it must be because the CP doesn't use the CSS the actual forum does. It should work if you change the replacement field code to this:
<center><font color="red">Spoiler Below</font></center> <div style="background: Black;color: Black;border-style: dashed;border-color: White;">{param}</div>
You won't need to add the CSS to the styles, too.
I'm already using a spoiler BB code that I made with javascript though.

Krose
14 Mar 2006, 08:42
nice hack! installed & *clicked install*..thank you..

Lost_Prophet
16 Mar 2006, 13:09
*Installed!*

NeitherSparky
06 Sep 2006, 22:06
I installed it; it works in 3.6 fine in case anyone wanted to ask. ;)

spandexman
14 Apr 2007, 23:33
Thanks for this :D I modified it to have a 1px solid border though. but very cool :D

Chris Beveridge
05 Apr 2008, 23:30
Is there a way to tweak it so that it doesn't create a new line for it? i.e. it exists within a line of text like, "This is a SPOILER surrounded by text"? I took out the red text above and changed it to a solid border, but i want it to be part of the sentence structure.

gamma626
10 Jun 2008, 11:17
where is the admin css template to change the code?

NeitherSparky
11 Jun 2008, 15:06
where is the admin css template to change the code?

Do you mean where do you paste it? It's in the instructions:

Admin CP > Styles & Templates > Style Manager > All Style Options>Additional CSS definitions

Scroll down near the bottom (it's the third entry from the bottom of All Style Options, at least for me) to get to Additional CSS Definitions. Remember to do it in EVERY skin you have installed.

If you meant something else then I apologise. :o

gamma626
12 Jun 2008, 12:20
Thanks for the reply NeitherSparky. That helps.

detik
06 Nov 2008, 13:27
test vb.org spoiler

HamidFULL
15 Nov 2008, 19:10
its working for 3.7.x?

NeitherSparky
16 Nov 2008, 16:43
its working for 3.7.x?

Yes.

HamidFULL
17 Nov 2008, 14:33
tnx!

CanK6
14 Feb 2009, 22:17
oky....

putergirl
15 Feb 2009, 01:11
downloaded