vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Modified spoiler tag for the lazy (https://vborg.vbsupport.ru/showthread.php?t=77917)

Mijae 03-11-2005 04:25 PM

Modified spoiler tag for the lazy
 
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 [spoiler][/spoiler] 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:
Code:

.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:
Code:

Title: Spoiler
Tag: spoiler
Replacement: <span class="spoiler" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color=this.style.backgroundColor='#000000'">{param}</span>
Example: [spoiler]Stuff goes here[/spoiler]
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

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

Quote:

Originally Posted by playboy
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>


All times are GMT. The time now is 05:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00915 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete