vb.org Archive

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

Fangs404 01-13-2009 10:00 PM

Inline Hover Spoiler BB Code
 
1 Attachment(s)
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/attachmen...1&d=1224134794

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.

AcidX 01-15-2009 03:24 PM

Installed.

But, it doesn't work on smilies and images, does it? :(

Maybe a fix?

Fangs404 01-16-2009 07:29 AM

Unfortunately, there's no way to fix it. It just works on text. It's basically coloring the background of the text the same color as the text (both are black), and when you hover over it, it simply changes the color of the text. You'd need to use one of those other spoiler mods that involves clicking a button if you want to hide non-text items.

Shaliza 01-16-2009 10:52 AM

That's cool. Easier for the lazy ones that don't feel like highlighting the words!

transparent 01-17-2009 07:08 AM

Works great thx!

TimberFloorAu 01-17-2009 10:19 PM

for those with a white background ( other colours just change the css )

Our bbcode is:

Code:

<span style="color: #ffffff; background: #ffffff;" onmouseover="this.style.color='#4096d4';" onmouseout="this.style.color='#ffffff';">Hide your message</span>
we also prefer [sp] and [/sp] as opposed to [spoiler]

Its quite fun, having it so there is no foreground colour to the bbcode, as users dont know its there. :)

Fangs404 01-18-2009 01:37 AM

I should mention that users might need to change the colors depending on the template. Thanks! :)

imedic 02-23-2009 10:51 AM

I wonder if this is penalized by Google?
Text on the same color as background is, as I remember penalized by G.
Can this become a problem if long texts are marked like this?

elpida 02-23-2009 01:29 PM

best way to do this even with images is to use OPACITY.


Code:

        filter:alpha(opacity=100);
        -moz-opacity:1;
        -khtml-opacity: 1;
        opacity: 1;

and just set it to 0 to turn back normal

Fangs404 02-26-2009 01:02 PM

Quote:

Originally Posted by imedic (Post 1752213)
I wonder if this is penalized by Google?
Text on the same color as background is, as I remember penalized by G.
Can this become a problem if long texts are marked like this?

I have no idea. The forum I use this on requires that you be a member to view any posts, so Google can't index it.


All times are GMT. The time now is 07:31 AM.

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.01531 seconds
  • Memory Usage 1,732KB
  • 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_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete