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
JQuery-animated Spoiler BBCode Details »»
JQuery-animated Spoiler BBCode
Version: 1.00, by JacquiiDesigns JacquiiDesigns is offline
Developer Last Online: Nov 2019 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.x Rating:
Released: 12-28-2010 Last Update: Never Installs: 43
Re-useable Code Additional Files  
No support by the author.

I've looked for a spoiler bbcode here at vB.org and did not find any to suit my need. So...

Brought to you by JacquiiDesigns.com - Here is a really nice spoiler bbcode that's animated with jquery. See a live example at BBCode Test: JPiC Forum For Writers

Directions are simple as sugar-free apple pie:
  1. Upload both "spoiler" and "images" folders to your forum root directory
  2. Add Custom BB Code via your AdminCP: AdminCP ==> Custom BB Codes ==> Add New BB Code

Input the following info in your BB Code Manager:
  • Title: Spoiler Tag

  • BB Code Tag Name: spoiler

  • Replacement:
    HTML Code:
    <link rel="stylesheet" type="text/css" href="http://your_forum_url/forum/spoiler/spoiler.css" />
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
    <script type="text/javascript">
    $(document).ready(function(){
    
    	$(".toggle_container").hide(); 
    
    	$("h2.trigger").click(function(){
    		$(this).toggleClass("active").next().slideToggle("slow");
    		return false; 
    	});
    
    });
    </script>
    
    <h2 class="trigger"><a href="#">Click To Show/Hide Hidden Content</a></h2>
    <div class="toggle_container">
    	<div class="block">
    		{param}
    	</div>
    </div>
  • Example: [spoiler]See? This is hidden text![/spoiler]

  • Description: This creates a hide/show spoiler tag that is hidden by default. Once the bar is clicked, the hidden contents will be shown.

  • Use {option}: No

  • Button Image: images/editor/spoiler.png

---------------
---------------

See example at http://jpicforum.info/forum/recycle-...html#post35010

PLEASE NOTE:
You'll need to edit in the replacement code your_forum_url/forum/ to be your own forum url.
If your forum url is http://www.mysite.com/forum/ -- then edit your replacement code to www.mysite.com/forum/

Download Now

File Type: zip jquery_spoiler_bbcode.zip (171.4 KB, 657 views)

Screenshots

File Type: png screencap.png (157.8 KB, 0 views)

Show Your Support

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

Comments
  #42  
Old 01-12-2013, 12:33 AM
dizzynation's Avatar
dizzynation dizzynation is offline
 
Join Date: Jun 2011
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/images/editor/spoiler.png
Reply With Quote
  #43  
Old 01-12-2013, 12:35 AM
dizzynation's Avatar
dizzynation dizzynation is offline
 
Join Date: Jun 2011
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are supposed to only get this text "Click Here To See Hidden Content?
Reply With Quote
  #44  
Old 01-12-2013, 07:00 PM
JacquiiDesigns's Avatar
JacquiiDesigns JacquiiDesigns is offline
 
Join Date: Dec 2008
Location: Tennessee
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dizzynation View Post
/images/editor/spoiler.png
Input the following info in your BB Code Manager:
  • Button Image: images/editor/spoiler.png

Quote:
Originally Posted by dizzynation View Post
Are supposed to only get this text "Click Here To See Hidden Content?
You should see the text - but also the background gradient image.
Reply With Quote
  #45  
Old 05-27-2013, 05:39 PM
egerr10 egerr10 is offline
 
Join Date: May 2013
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi guys. I have a problem with that spoiler. in the admin panel spoiler works fine
the preview is also doing well. but in a thread problem

I did not change the script code, only css. externally spoiler looks different if somebody needs my version below. I'm sorry for my bad english

http://worldofheroes.ru/threads/20-%...82?p=29#post29


Code:
h2.trigger {
	background: #E9E9E6 url(/images/misc/icon_plus.gif) no-repeat 4px 50%;
    font: 12px verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;
	font-size: 12px;
	padding: 3px 17px 3px 17px;
	margin: 0 0 0 0px;
	line-height: 15px;
	font-weight: bold;
	cursor: pointer;
	background-position-x: 4px;
	border: 1px solid #D6D6D6;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
}
h2.trigger a {
}
h2.trigger a:hover { 
	color: #48861E;	
}

h2.active {
	background: #E9E9E6 url(/images/misc/icon_minus.gif) no-repeat 4px 50%;
	background-position-x: 4px;
	border-bottom: none;
	border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
	-webkit-border-bottom-right-radius: 0px;
    -webkit-border-bottom-left-radius: 0px
	-moz-border-radius-bottomleft: 0px;
	-moz-border-radius-bottomright: 0px;
}

 
.toggle_container {
	margin: 0 0 5px;
	padding: 0;
	border: 1px solid #D6D6D6;
	background: #F3F3F3;
	overflow: hidden;
	clear: both;
	border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
	-webkit-border-bottom-right-radius: 5px;
    -webkit-border-bottom-left-radius: 5px
	-moz-border-radius-bottomleft: 5px;
	-moz-border-radius-bottomright: 5px;
}

.toggle_container .block {
	padding: 10px 6px; /*--Padding of Container--*/
}
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 10:38 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.04089 seconds
  • Memory Usage 2,286KB
  • Queries Executed 22 (?)
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
  • (1)bbcode_code
  • (1)bbcode_html
  • (2)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
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (2)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)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