Log in

View Full Version : Modified spoiler tag for the lazy


Mijae
03-11-2005, 04:25 PM
Not sure if this should be here, if not the mods should feel free to move it wherever it should be :)

What this does: its a BB code that will make all text between the hidden until you hover your mouse over it.

Step #1:

Go to Styles & Templates >> your style >> All Style Options, click Go, scroll down until Additional CSS Definitions, and there add:

.spoiler
{
color: #000000;
text-decoration: none;
background-color: #000000;
}


Step #2:
Now go to Custom BB Codes and select Add New BB Code. There, add the following information:

Title: Spoiler
Tag: spoiler
Replacement: <span class="spoiler" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color=this.style.backgroundColor='#0000 00'">{param}</span>
Example: Stuff goes here
Description: The spoiler tag will hide the text between the tags, and will appear only when you put your mouse over the hidden text.
Use {option}: set to No


And that's it! Now you have a fully functional spoiler code!

Demo: Check out this thread (http://www.anotherforum.net/showthread.php?t=46)

Additional info: this codes is valid XHTML 1.0 Transitional.

Enjoy :)

Mijae
03-11-2005, 04:35 PM
Thanks for moving it, and sorry about it :P

HeloHi
05-15-2005, 01:22 AM
Thanks, I have been looking for something just like this :)

works like a charm, nice and simple :cool:

Borgs8472
05-15-2005, 09:21 PM
Can this hide images too?

playboy
06-16-2005, 11:28 PM
Is There A Way To Make It 'on click' Rather Then 'on mouse-over' ?

playboy
06-20-2005, 01:46 AM
Anyone? I Could Probably Figure It Out If I Knew HTML... But I Dont :(

fly
07-18-2005, 03:35 PM
Anyone? I Could Probably Figure It Out If I Knew HTML... But I Dont :(
Replacement: <span class="spoiler" onclick="this.style.color='#FFFFFF';">{param}</span>