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

Reply
 
Thread Tools
Custom Spoiler Details »»
Custom Spoiler
Version: 1.00, by orange gold orange gold is offline
Developer Last Online: Sep 2011 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.2 Rating:
Released: 04-17-2009 Last Update: Never Installs: 26
Re-useable Code Is in Beta Stage  
No support by the author.

please leave feedback

...

The following bbcode creates a spoiler which allows you to give a button a title then when the button is pressed it reveals the text inside

Title:
Code:
Spoiler
BB Code Tag Name
Code:
Spoiler
Replacement:
HTML Code:
<div>
    <div class="pre-spoiler">
    <input type="button" value="{option}" style="width:450px;font-size:14px;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.value = '{option}';}">
    </div>
    <div>
        <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div>
    </div>
</div>
Example:
Code:
[spoiler=enter your title here]enter your text here[/spoiler]
Description:
Code:
shows and hides text with the click of a button
Remove Tag If Empty: Yes


ENJOY!

Screenshots

File Type: jpg screen.jpg (11.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-19-2009, 08:56 PM
orange gold orange gold is offline
 
Join Date: Dec 2007
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is far as i know that can not be fixed because any browser would take it in as html... but ill work on it. thankyou for the feedback
Reply With Quote
  #13  
Old 04-19-2009, 11:32 PM
mystikmedia mystikmedia is offline
 
Join Date: Feb 2009
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Look forward to hearing if you find a work-around.
Reply With Quote
  #14  
Old 04-20-2009, 02:25 AM
orange gold orange gold is offline
 
Join Date: Dec 2007
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no problem. i need this fixed for my own forum as well hehe
edit: also if anyone else here finds a work around here before me please post it here so i can fix my code and give credit to you in this thread
Reply With Quote
  #15  
Old 09-06-2009, 01:15 PM
tspaetten tspaetten is offline
 
Join Date: Mar 2008
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed

Hey mate thanks for this, i have a quick ? is possible to change the color of the button, i cant figure it out. So please let me know,
Reply With Quote
  #16  
Old 01-09-2010, 09:58 PM
tonyzhou tonyzhou is offline
 
Join Date: Nov 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

XSS

[spoiler=xss';alert('XSS');var y=']test[/spoiler]

click button twice
Reply With Quote
  #17  
Old 02-02-2011, 11:57 PM
Mr. Flowers Mr. Flowers is offline
 
Join Date: Jan 2011
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it but removed the pre-spoiler as it was so annoying on my forum. The button was huge aswell so I reduced the size.
It works great though and is so easy to install thanks!
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 01:52 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.07050 seconds
  • Memory Usage 2,285KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_code
  • (1)bbcode_html
  • (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
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete