Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Spoiler Tag Details »»
Spoiler Tag
Version: 1.00, by ChopSuey ChopSuey is offline
Developer Last Online: Jul 2010 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.0.x Rating:
Released: 05-26-2010 Last Update: Never Installs: 77
Template Edits
Re-useable Code Translations  
No support by the author.

Title: Spoiler Tag

BBCode Tag Name: spoiler

Replacement:
HTML Code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right>  
<input type="button" value="Show Spoiler" style="font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';   this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{param}
</div>
</div>
</div>
Example: [spoiler]testing testing[/spoiler]

Descpription: Hide large images or just text.

Set all options to NO (If any options have yes selected, it will not work. Enjoy!

---------------------------------------------------------------------------------------------------------------------
It at first says, "Show Spoiler" - "Hide" - After clicking it just says "Show"

Show Your Support

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

Comments
  #22  
Old 08-03-2010, 02:31 AM
homanhtruong homanhtruong is offline
 
Join Date: Jan 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks. installed
Reply With Quote
  #23  
Old 08-07-2010, 10:19 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LatinoCheats View Post
And how do I change the background of the Spoiler? That is, change the background where writing the occult? Thanks!
To remove the background color delete the class="alt2" from the code.

To change to a different color add a background color to the style attribute... such as:

Code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right>  
<input type="button" value="Show Spoiler" style="font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';   this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div style="margin: 0px; padding: 6px; border: 1px inset; background: red;">
<div style="display: none;">
{param}
</div>
</div>
</div>
The only line changed was the second to last <div> tag... in this case from:
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
to:
<div style="margin: 0px; padding: 6px; border: 1px inset; background: red;">
Reply With Quote
  #24  
Old 08-11-2010, 10:35 PM
PreciseDemise PreciseDemise is offline
 
Join Date: Jun 2010
Location: England
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We've been using this for some time without problem, but it has recently it has stopped working, possibly due to the latest update of vB(4.0.5)
Code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color=#bb0000><b>&nbsp;</b></font></right>  
<input type="button" value="Show Spoiler" style="font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';   this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{param}
</div>
</div>
</div>
Any advice?
Reply With Quote
  #25  
Old 08-11-2010, 11:07 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BB Code is just HTML, as long as {param} is there it should work in any VB version... I would try deleting the code and re-adding it, maybe something got corrupted along the way but it should work just fine.
Reply With Quote
  #26  
Old 08-12-2010, 11:07 AM
ZEHH's Avatar
ZEHH ZEHH is offline
 
Join Date: Oct 2009
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Spoiler tag is not working in Firefox browser, any solution?
Reply With Quote
  #27  
Old 08-12-2010, 01:08 PM
PreciseDemise PreciseDemise is offline
 
Join Date: Jun 2010
Location: England
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ZEHH View Post
Spoiler tag is not working in Firefox browser, any solution?
So it's not just us then ...
Reply With Quote
  #28  
Old 08-12-2010, 04:16 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's working fine for me in Firefox-
http://www.juot.net/forums/showpost....36&postcount=2

Does it work for you guys on my site/link?
Reply With Quote
  #29  
Old 08-13-2010, 12:37 PM
PreciseDemise PreciseDemise is offline
 
Join Date: Jun 2010
Location: England
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET CLR 1.1.4322)
Timestamp: Sun, 15 Aug 2010 12:07:38 UTC


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working
Details from Firebug/Firefox Error console. Maybe it'll help ...

@BirdofPrey; Your using an old version(v3.8.6) of vB not v4.0.6, that is the difference dude =\
Reply With Quote
  #30  
Old 08-13-2010, 04:21 PM
your24hourstore your24hourstore is offline
 
Join Date: Feb 2010
Posts: 1,226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PreciseDemise View Post
Code:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET CLR 1.1.4322)
Timestamp: Sun, 15 Aug 2010 12:07:38 UTC
 
 
Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working
 
 
Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working
Details from Firebug/Firefox Error console. Maybe it'll help ...

@BirdofPrey; Your using an old version(v3.8.6) of vB not v4.0.6, that is the difference dude =\
the author is no longer with us as of last month , there will be no updates to chop sueys mods as he is deceased
Reply With Quote
  #31  
Old 08-13-2010, 05:43 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PreciseDemise View Post
Code:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET CLR 1.1.4322)
Timestamp: Sun, 15 Aug 2010 12:07:38 UTC


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working


Message: 'this.parentNode.parentNode.getElementsByTagName(. ..).1' is null or not an object
Line: 1344
Char: 1
Code: 0
URI: http://www.dbc-forum.net/showthread....topped-working
Details from Firebug/Firefox Error console. Maybe it'll help ...

@BirdofPrey; Your using an old version(v3.8.6) of vB not v4.0.6, that is the difference dude =\
1) BB Codes work exactly the same in 3.8 as 4.0
2) I have a test install of 4.0.4 and it also works fine with FF on that

Can you try it with the default style- maybe something in a custom style is conflicting

Also can you post line 1344 (and neighboring lines) from the page source that generated that error? (or whatever lines around the error the next time you go to that page).
Reply With Quote
Reply


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 06:39 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.04627 seconds
  • Memory Usage 2,343KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete