vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Show/Hide Subforums (https://vborg.vbsupport.ru/showthread.php?t=304776)

ramesh_umk3 11-19-2013 11:00 PM

Show/Hide Subforums
 
1 Attachment(s)
Show/Hide Subforums & Save Page Load Time...!

Hello All,
Hope this mod is not present already and this mod will be useful to save page load time for busy/huge forums like ours.

Lets Start :)

GOTO --> Style Manager --> forumhome_forumbit_level1_post

Find:
Code:

{vb:raw forum.subforums}
Replace:
Code:

<div class="divspoiler">
<input type="button" class="mc" value="→ MORE SUBFORUMS" onclick="if (this.parentNode.nextSibling.childNodes[0].style.display != '') { this.parentNode.nextSibling.childNodes[0].style.display = ''; this.value = '↑ HIDE SUBFORUMS'; } else { this.parentNode.nextSibling.childNodes[0].style.display = 'none'; this.value = '↓ SHOW SUBFORUMS'; }" />
</div><div><div class="spoiler" style="display: none;">
                       
<div style="padding:1px;">{vb:raw forum.subforums}</div>

</div></div>



Button Style CSS: [Add below code any were in additional.css template]

Code:

.mc {
display: inline-block;
margin-top: 8px;
background: #f9f9f9;
background: -moz-linear-gradient(top,#f9f9f9 0,#eaeaea 100%);
background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#f9f9f9),color-stop(100%,#eaeaea));
background: -webkit-linear-gradient(top,#f9f9f9 0,#eaeaea 100%);
background: -o-linear-gradient(top,#f9f9f9 0,#eaeaea 100%);
background: -ms-linear-gradient(top,#f9f9f9 0,#eaeaea 100%);
background: linear-gradient(top,#f9f9f9 0,#eaeaea 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F9F9F9',endColorstr='#EAEAEA',GradientType=0);
height: auto;
border: 1px solid #cacaca;
border-radius: 3px;
padding: 7px;
text-align: left;
line-height: 23px;
box-shadow: inset 0 1px 2px white,0px 1px 1px rgba(0,0,0,0.12);
padding-left: 9px;
font-weight: bold;
text-transform: uppercase;
color: #6f6f6f;
text-shadow: 0 1px white;
margin-top: 10px;
cursor:pointer;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -khtml-border-radius: 5px;
    border-radius: 5px;
}

.mc:hover {
    background: #fefefe;
    background: -moz-linear-gradient(top, #fefefe 0, #fbfbfb 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fefefe), color-stop(100%, #fbfbfb));
    background: -webkit-linear-gradient(top, #fefefe 0, #fbfbfb 100%);
    background: -o-linear-gradient(top, #fefefe 0, #fbfbfb 100%);
    background: -ms-linear-gradient(top, #fefefe 0, #fbfbfb 100%);
    background: linear-gradient(top, #fefefe 0, #fbfbfb 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FEFEFE', endColorstr='#FBFBFB', GradientType=0);
}
.mc:active {
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.40), 0px 1px 1px rgba(0, 0, 0, 0.12);
}

Also follow same procedure in forumhome_forumbit_level2_post template

LIVE DEMO

Thanks All

faisaly.com 11-20-2013 05:02 PM

1 Attachment(s)
heres an attached image from the site.

snakedevil 11-20-2013 08:45 PM

Thanks !

Possible to exclude forum sections ? :)

Macgiber 11-21-2013 02:29 AM

good job friend, you would have to do to be centered under the subforum oh?

ramesh_umk3 11-21-2013 03:18 AM

Quote:

Originally Posted by snakedevil (Post 2462438)
Thanks !

Possible to exclude forum sections ? :)

Just go through VB Template Conditions you can apply it i think . Feel Free to try :)

Thanks

Quote:

Originally Posted by Macgiber (Post 2462513)
good job friend, you would have to do to be centered under the subforum oh?

Possible just add <center> above the code and </center> below the code it will work :)

Thanks

Macgiber 11-21-2013 03:27 AM

Thanks , ready.

puertoblack2003 11-24-2013 06:34 PM

nice setup looks like xda forum but the light version :D

ramesh_umk3 11-24-2013 07:08 PM

Quote:

Originally Posted by puertoblack2003 (Post 2463422)
nice setup looks like xda forum but the light version :D

Yeah we have a low budget :D but we did and still doing our best with model :up:

snakedevil 11-26-2013 10:41 AM

Quote:

Originally Posted by ramesh_umk3 (Post 2462525)
Just go through VB Template Conditions you can apply it i think . Feel Free to try :)

Does not work :(

tbworld 11-26-2013 10:52 AM

Quote:

Originally Posted by snakedevil (Post 2463813)
Does not work :(

Please post something helpful, your response does not help the author or other users as you gave no details on your experience using it. At least indicate what version of vbulletin you were using and any errors you received from your browser and/or server logs. This helps the whole community. Thank you! :)

Most likely the JavaScript is not executing, check your browser for JavaScript errors.


All times are GMT. The time now is 02:32 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.01120 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete