vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   BB Code Enhancements - Inline Hover Spoiler BBCode (https://vborg.vbsupport.ru/showthread.php?t=193748)

Fangs404 10-15-2008 10:00 PM

Inline Hover Spoiler BBCode
 
I'm fairly new to the vBulletin scene. Having been a member of Something Awful for a while, I've grown to really like their spoiler tag. I searched around, but I couldn't find a similar spoiler tag for vB3. Every single spoiler tag I saw requires that you either click a button (which doesn't allow inline spoilers) or highlight text (which requires unnecessary work). I wanted to mimic SA's simple tag on my forum, so I figured out how to do it, and this is what you see here today. This mod is completely theme-independent (it's just a BB code, nothing else!), and it'll keep your site W3C compliant.

Without hovering, you see nothing but black:
https://vborg.vbsupport.ru/external/2012/03/41.jpg

However, when you hover the mouse over the black section of text, it magically appears:
https://vborg.vbsupport.ru/external/2012/03/41.jpg

Title: Spoiler
BB Code Tag Name: spoiler
Replacement:
HTML Code:

<span style="color: #000000; background: #000000;" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color='#000000';">{param}</span>
Example: [spoiler]THIS TEXT IS SPOILERED LOL[/spoiler]
Description: This tag changes the text into a black box which is unreadable. If you hover the mouse over the black box, the text will magically appear.
Use Option: No
Image: https://vborg.vbsupport.ru/external/2009/01/66.jpg

Note: Depending on your template, you may need to change the colors in the HTML replacement code. Just make sure that color, background, and onmouseout match and that onmouseover is different. The colors in the above code are ideal for a template with a light background and dark text.

Krahl 10-16-2008 05:03 AM

Works great, thanks! Installed.

Glynn58 10-16-2008 02:09 PM

Fantastic works great, thanks

sensimilla 10-16-2008 07:42 PM

I was always wondering whats the purpose of spoiler , what its good for ?
Greets for SA

Fangs404 10-16-2008 09:03 PM

Quote:

Originally Posted by sensimilla (Post 1646585)
I was always wondering whats the purpose of spoiler , what its good for ?
Greets for SA

Say you're discussing what happened at the end of Iron Man. Instead of openly discussing it with the chance that sameone can unwillingly read it that was gonna be seeing it this weekend, you can hide text behind the spoiler tag. That way, they'll know not to read that section of text until they've seen the movie. It's great for discussing movies, TV shows, video games, etc in the open without having to worry about pissing someone off by spoiling some major aspect of whatever you're talking about.

I'm glad you guys like it. It's very simple, but it's incredibly effective. :)

sensimilla 10-17-2008 10:45 AM

Quote:

Originally Posted by Fangs404 (Post 1646658)
Say you're discussing a what happened at the end of Iron Man. Instead of openly discussing it with the chance that sameone can unwillingly read it that was gonna be seeing it this weekend, you can hide text behind the spoiler tag. That way, they'll know not to read that section of text until they've seen the movie. It's great for discussing movies, TV shows, video games, etc in the open without having to worry about pissing someone off by spoiling some major aspect of whatever you're talking about.

I'm glad you guys like it. It's very simple, but it's incredibly effective. :)

Wow, sounds reasonable! Never thought about it this way, thanks for releasing it I will install it on my site :D

Whitey Bear 10-29-2008 04:24 PM

This was exactly what I was looking for and works perfectly, thanks.

lostgirl815 11-11-2008 08:31 AM

Very nice - the collapse boxes were getting to be a lot of work for game hints. :)

UncoderMom 01-05-2009 05:31 PM

Perfect! Thank You!!

ndut 01-07-2009 02:21 AM

coolllll.. thanks :)


All times are GMT. The time now is 12:29 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.01084 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete