Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
Inline Hover Spoiler BB Code Details »»
Inline Hover Spoiler BB Code
Version: 1.0, by Fangs404 Fangs404 is offline
Developer Last Online: Sep 2019 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.x Rating:
Released: 01-13-2009 Last Update: Never Installs: 20
Re-useable Code Translations  
No support by the author.

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:


However, when you hover the mouse over the black section of text, it magically appears:


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:

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Nook_Neformat

Comments
  #2  
Old 01-15-2009, 03:24 PM
AcidX's Avatar
AcidX AcidX is offline
 
Join Date: Jan 2006
Location: Macedonia
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed.

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

Maybe a fix?
Reply With Quote
  #3  
Old 01-16-2009, 07:29 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-16-2009, 10:52 AM
Shaliza Shaliza is offline
 
Join Date: Apr 2006
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's cool. Easier for the lazy ones that don't feel like highlighting the words!
Reply With Quote
  #5  
Old 01-17-2009, 07:08 AM
transparent transparent is offline
 
Join Date: Apr 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great thx!
Reply With Quote
  #6  
Old 01-17-2009, 10:19 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 01-18-2009, 01:37 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I should mention that users might need to change the colors depending on the template. Thanks!
Reply With Quote
  #8  
Old 02-23-2009, 10:51 AM
imedic's Avatar
imedic imedic is offline
 
Join Date: Mar 2008
Location: Romania
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 02-23-2009, 01:29 PM
elpida elpida is offline
 
Join Date: Jul 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 02-26-2009, 01:02 PM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by imedic View Post
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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04678 seconds
  • Memory Usage 2,310KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete