Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
Move Sub-forums listing below threads... Details »»
Move Sub-forums listing below threads...
Version: 1.00, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.x Rating:
Released: 08-29-2010 Last Update: 08-29-2010 Installs: 8
Supported Template Edits
Re-useable Code Translations  

By default vBulletin shows the listing of sub-forums above all threads in a forum. This is OK if you have 1 or 2 sub-forums but if you have many sub-forums they can quickly fill the screen and user's won't see any threads at all without scrolling which is very annoying.

There are two ways to do this- the easy way will put ALL sub-forums below your threads... The second way is a little harder but will let you specify in which forums you want to keep the sub-forums on top and in which to move sub-forums below threads.

Live Demo: Here (No longer setup this way.)

Method 1 - Move sub-forums below threads for all forums.

Edit your forumdisplay template:

Find the code:
Code:
<if condition="$show['forumslist']">
<!-- sub-forum list  -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
	<td class="tcat" width="100%">$vbphrase[subforums]<span class="normal"> : $foruminfo[title]</span></td>
	<if condition="$show['forumsearch']">
	<td class="vbmenu_control" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></if></td>
	</if>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead">$vbphrase[last_post]</td>
	  <td class="thead">$vbphrase[threads]</td>
	  <td class="thead">$vbphrase[posts]</td>
	  <if condition="$vboptions[showmoderatorcolumn]">
	  <td class="thead">$vbphrase[moderator]</td>
	  </if>
	</tr>
</thead>
$forumbits
</table>
<br />
<!-- / sub-forum list  -->
</if>
"Cut" the code so it gets deleted but copied to your "clipboard"

Now Find:

Code:
$ad_location[ad_forumdisplay_afterthreads
And above this code "paste" in the code you cut above.

Save the Template- now your sub-forums will show up below your threads in all forums that have sub-forums.


The Second Method:

If you want sub-forums to stay on top in some forums but below threads in others than do the following:

In the forumdisplay template:

Find the line:
Code:
<if condition="$show['forumslist']">
and change it to:
Code:
<if condition="$show['forumslist'] AND !in_array($GLOBALS[forumid], array(X, Y, Z))">
Where X, Y, Z are the forumid's of forums you want the sub-forums BELOW the threads. You can have as many or as few forumid's listed here as you want, just separate each with a comma.

Now copy the entire section of text:

Code:
<if condition="$show['forumslist'] AND !in_array($GLOBALS[forumid], array(X, Y, Z))">
<!-- sub-forum list  -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
	<td class="tcat" width="100%">$vbphrase[subforums]<span class="normal"> : $foruminfo[title]</span></td>
	<if condition="$show['forumsearch']">
	<td class="vbmenu_control" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></if></td>
	</if>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead">$vbphrase[last_post]</td>
	  <td class="thead">$vbphrase[threads]</td>
	  <td class="thead">$vbphrase[posts]</td>
	  <if condition="$vboptions[showmoderatorcolumn]">
	  <td class="thead">$vbphrase[moderator]</td>
	  </if>
	</tr>
</thead>
$forumbits
</table>
<br />
<!-- / sub-forum list  -->
</if>
and paste the code above the line:

Code:
$ad_location[ad_forumdisplay_afterthreads
Now edit the line you just pasted in:

Code:
<if condition="$show['forumslist'] AND !in_array($GLOBALS[forumid], array(X, Y, Z))">
Make sure X, Y, Z are the same forumid's you specified in step 1... also remove the "!" from this line of code so you have:
Code:
<if condition="$show['forumslist'] AND in_array($GLOBALS[forumid], array(X, Y, Z))">
Save your template changes.

Now you will have some forums with sub-forums below the threads and some above the threads. If you ever edit this in the future be sure to edit the forumid's in both places.

Note also: The code I listed is for the default style, it's possible in a custom style your exact code may be a little different so please try to match it up best you can and always copy and paste the actual code from your template and not the code in this example.

---

Download the .txt file for a copy of the install instructions.

---

Please click Install if you use this.

Download Now

File Type: txt subforums_below_threads.txt (5.3 KB, 25 views)

Screenshots

File Type: jpg ss_subforums_below.jpg (127.6 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 11-25-2011, 07:00 PM
SpikedRocker SpikedRocker is offline
 
Join Date: Jul 2009
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If this could be updated for 4.X.X stuff that would be great :-P
Reply With Quote
  #3  
Old 11-25-2011, 08:42 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SpikedRocker View Post
If this could be updated for 4.X.X stuff that would be great :-P
VB4 Version: https://vborg.vbsupport.ru/showthread.php?t=251127
Reply With Quote
2 благодарности(ей) от:
fxwoody, SpikedRocker
  #4  
Old 12-19-2011, 11:23 AM
fxwoody's Avatar
fxwoody fxwoody is offline
 
Join Date: Jun 2010
Location: On Earth
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tks buddy, this is mostly useful if you have a chat box in thread views also since it's down under the main threads

Cheers
Reply With Quote
  #5  
Old 12-19-2011, 11:52 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fxwoody View Post
Tks buddy, this is mostly useful if you have a chat box in thread views also since it's down under the main threads

Cheers
Please "mark as installed" if you are using it. Thanks.
Reply With Quote
Reply

Thread Tools

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 06:37 PM.


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.04293 seconds
  • Memory Usage 2,276KB
  • Queries Executed 19 (?)
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
  • (8)bbcode_code
  • (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
  • (5)post_thanks_box
  • (2)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete