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
Collapsing Divs Details »»
Collapsing Divs
Version: 1.00, by ViciousCode ViciousCode is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.4 Rating:
Released: 11-20-2009 Last Update: Never Installs: 6
Re-useable Code Translations  
No support by the author.

This mod is like a show/hide spoiler bbcode, but more features, has the ability to show/hide anything you want, with nice fade effects

Step 1. Upload the .js files from the archive to your forum clientscript folder

Step 2. Edit Your Style

This can go into the Main CSS of the style, or inside headerinclude template

Code:
<style>
.offtopicComment
{
	cursor: pointer;
	margin: 10px 0 0 0px;
	background-color: #fff8fb;
	border: #ffc0db 1px solid;
	border-left: #ffc0db 1px solid;
	color: #000000;
	padding: 8px;
}
.offtopicText
{
	margin: 15px 0 0 0;
	width: 100%;
	color: #c71c65;
	background-color: #fff8fb;
}
.offtTitle
{
	margin: 15px 0 0 0;
	width: 100%;
	color: #c71c65;
	background-color: #fff8fb;
}
.OffTopicC
{
	cursor: pointer;
	margin: 10px 0 0 0px;
	background: #E4F9FC;
	border: #1DC2E0 1px solid;
	border-left: #1DC2E0 1px solid;
	color: #0F577D;
	width: 98%;
	padding: 8px;
}
.OffTopicText
{
	margin: 15px 0 0 0;
}
</style>
this goes inside the header include template (make sure to replace forum-url with your forum address!

Code:
<script type="text/javascript" src="forum-url/clientscript/bbcode.js"></script>
<script type="text/javascript" src="forum-url/clientscript/effect_class.js"></script>
Step 3.

create a new bbcode, and open BBCODE.txt, copy the code inside and paste it inside in the replacement box

Code:
<div onclick="showOfftopic(this, 'Off-Topic Comment')" class="OffTopicC">
<span style="font-weight: bold;" id="offtTitle">Off-Topic Comment</span>
<div id="cLayer" style="display: none;" class="OffTopicText">{param}</div></div>
if you want a special title for the box, enable the option field,
copy the code below and paste it inside the replacement box

Code:
<div onclick="showOfftopic(this, '{option}')" class="OffTopicC">
<span style="font-weight: bold;" id="offtTitle">{option}</span>
<div id="cLayer" style="display: none;" class="OffTopicText">{param}</div></div>

Download Now

File Type: zip Div-BBCode.zip (6.6 KB, 44 views)

Screenshots

File Type: jpg screen1.jpg (49.1 KB, 0 views)
File Type: jpg screenshot2.jpg (76.0 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 11-21-2009, 07:55 PM
ViciousCode ViciousCode is offline
 
Join Date: Oct 2008
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Note: This Mod works with vBulletin versions 3.6 to 4.0
Reply With Quote
  #3  
Old 11-22-2009, 11:45 AM
mbc100 mbc100 is offline
 
Join Date: Feb 2009
Location: K.S.A
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mod thanks
Reply With Quote
  #4  
Old 11-22-2009, 12:14 PM
saadessa saadessa is offline
 
Join Date: Jan 2008
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice yhank you ......installed
Reply With Quote
  #5  
Old 11-22-2009, 10:40 PM
AzzidReign's Avatar
AzzidReign AzzidReign is offline
 
Join Date: Apr 2006
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is good! Thanks.
Reply With Quote
  #6  
Old 07-30-2010, 07:01 PM
tgralex tgralex is offline
 
Join Date: Jun 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed and voted - it is a great thing!
One question, if I have recursive structure like

[OFF]
..................Main Level
..................[OFF]
................................Sub Level 1
..................[/OFF]

..................[OFF]
................................Sub Level 2
..................[/OFF]
[/OFF]

When I expand Main - it works as expected, but when I try to open Sub Level 1 or Sub Level 2, it actually collapses entire structure as if I click on Main Level's header.

Would be nice to support recursion in your BB code.

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 02:03 AM.


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.04074 seconds
  • Memory Usage 2,271KB
  • 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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (3)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete