vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Collapsing Divs (https://vborg.vbsupport.ru/showthread.php?t=228560)

ViciousCode 11-20-2009 10:00 PM

Collapsing Divs
 
1 Attachment(s)
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>


ViciousCode 11-21-2009 07:55 PM

Note: This Mod works with vBulletin versions 3.6 to 4.0

mbc100 11-22-2009 11:45 AM

nice mod thanks

saadessa 11-22-2009 12:14 PM

nice yhank you ......installed

AzzidReign 11-22-2009 10:40 PM

This is good! Thanks.

tgralex 07-30-2010 07:01 PM

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!


All times are GMT. The time now is 02:46 AM.

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.00963 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete