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)

faisaly.com 11-26-2013 06:20 PM

This works great using vb4.2.0

no problems at all!

Leifer 12-13-2013 04:45 PM

Works on 4.2.1 too ;)
Thanks a lot

mohammed146 01-03-2014 12:56 PM

good work

mikez006 03-18-2014 06:22 PM

anyway to make this work on certain forums only?

ramesh_umk3 03-18-2014 08:57 PM

Yes possible just use if - else it will work below is example and demo

PHP Code:

<vb:if condition="in_array($forum['forumid'], array(9))">
<
div class="divspoiler">
<
input type="button" class="spb" 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>

<
vb:else />

{
vb:raw forum.subforums}
</
vb:if> 

were 9 is my forum id for Programming. Just place comma after each forum id example below

PHP Code:

<vb:if condition="in_array($forum['forumid'], array(9,11,105,200))"

Regards,

Mr_Running 03-19-2014 01:24 AM

Excellent :) One thing I did notice: If there is no Forum Description entered the Button locates it self to the right but if there is a Description the button will stay under the Description.

Trying to figure out...How to keep the button under Forum Title without the forum Description?

mikez006 03-19-2014 03:47 AM

perfect, thanks :)

ramesh_umk3 03-19-2014 12:05 PM

Quote:

Originally Posted by Mr_Running (Post 2488245)
Excellent :) One thing I did notice: If there is no Forum Description entered the Button locates it self to the right but if there is a Description the button will stay under the Description.

Trying to figure out...How to keep the button under Forum Title without the forum Description?

search and move below code in the mod which i released at 1st post

Code:

<vb:if condition="$show['forumdescription']"><p class="forumdescription">{vb:raw forum.description}</p></vb:if>
but that is not a proper style show description to users always so that they will find useful with subforums links...

Mr_Running 03-19-2014 03:00 PM

1 Attachment(s)
I could be wrong but I believe the code would add a forum description?

Here is an image of what it looks like when there is No forum description...

Mr_Running 03-19-2014 03:03 PM

Show/Hide Subforums buttons removed from Demo site?


All times are GMT. The time now is 02:53 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.01130 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)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