Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Move Sub-forums listing below threads... (vB4) Details »»
Move Sub-forums listing below threads... (vB4)
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: 4.0.x Rating:
Released: 09-24-2010 Last Update: Never Installs: 34
Supported Template Edits
Re-useable Code Translations  

This is the vB4 version of my vB3 mod here:https://vborg.vbsupport.ru/showthread.php?t=249626

Demo: http://www.qapla.com/mods/forumdispl...ions?styleid=5

This is a simple template edit to move sub-forums display below the threads in a forum rather than on top like they are now. There are various reasons for this, all come down to personal preference. Personally if I have a lot of sub-forums I want users to be able to see the threads without needing to scroll down.

NOTE - For VB 4.2.1 and any version where the code does not match below, see Post # 28 for alternate instructions.

In your FORUMDISPLAY template find the code:

Code:
<vb:if condition="$forumbits">
{vb:raw template_hook.forumdisplay_above_subforums}
<div id="forumbits" class="forumbits">
	<div class="forumhead">
		<h2>
			<span class="forumtitle">{vb:rawphrase subforums}</span>
			<span class="forumlastpost">{vb:rawphrase last_post}</span>
		</h2>
	</div>
	<ol>
		{vb:raw forumbits}
	</ol>

	{vb:raw forumhome_markread_script}
</div>
</vb:if>
And "CUT" it to your clipboard... (Copy it and delete it but save a copy)

Now find:

Code:
	<div class="threadpagenav">
		{vb:raw pagenav}
		{vb:raw forumjump}
	</div>
</div>
And below that PASTE the code you cut above...

And that's it, now your sub-forums will show under your threads. See the screen shot.

Download the .txt file as a backup.

Please Mark as Installed if you use this.

Download Now

File Type: txt subforum_display_below_threadsv4.txt (1.2 KB, 71 views)

Screenshots

File Type: jpg ss_subforums_below_v4.jpg (105.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
spencerp

Comments
  #22  
Old 01-25-2012, 09:38 PM
EconomicVoice EconomicVoice is offline
 
Join Date: Aug 2009
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a nice simple Mod which I have been looking for for some time now (I had considered just 'going for it' myself but lacked the courage/knowledge). Thanks.
Reply With Quote
Благодарность от:
BirdOPrey5
  #23  
Old 02-20-2013, 10:40 AM
amogh amogh is offline
 
Join Date: Mar 2011
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I was looking for BUT can I do the following?

- I want to use this mod only for few forums and not all the forums. Can this be done in VB4?

I know it can done in your VB3 hack.

Quote:
The Second Method:

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

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

Basically like with VB3 you can use template conditionals instead.

Rather than delete the code from the top just copy it to the bottom location.

Now you need to surround both in template conditionals, just like VB 3.x

However a VB 3 conditional looks like:

Code:
<if condition="code..."> 
code
</if>
VB4 conditionals just have vb: added before the if:


Code:
<vb:if condition="code..."> 
code
</vb:if>
That's the only change you make.
Reply With Quote
  #25  
Old 03-05-2013, 12:50 PM
flash84 flash84 is offline
 
Join Date: Apr 2012
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SpikedRocker View Post
Question:

In my template it looks like this:
Code:
<vb:if condition="$forumbits">
{vb:raw template_hook.forumdisplay_above_subforums}
<div id="forumbits" class="forumbits">
	<div class="forumhead">
		<h2>
			<span class="forumtitle">{vb:rawphrase subforums}</span>
			<span class="forumthreadpost">{vb:rawphrase threads_posts}&nbsp;</span>
			<span class="forumlastpost">{vb:rawphrase last_post}</span>
		</h2>
	</div>
	<ol>
		{vb:raw forumbits}
	</ol>
</div>
{vb:raw template_hook.forumdisplay_below_subforums}
</vb:if>
This is a customized forum style, but it appears they've linked the display for above and below subforum in the same $forumbits condition?

When I made the changes listed here, all it did for me was move the forum title to where the thread is, and did not move the threads at all.

I am assuming the way this style is coded I cannot do this because I am moving both parts instead of the sub-forums?
My code looks the same as yours. I am running vbulletin 4.2. Here are the steps I found to move the subforums below the threads in vb4.2:

http://www.vbulletin.com/forum/forum...then-subforum?
Reply With Quote
  #26  
Old 03-08-2013, 04:12 PM
vimarc vimarc is offline
 
Join Date: Feb 2013
Location: SnappyFizz.com
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working need to change according to 4.2.0
Reply With Quote
  #27  
Old 03-12-2013, 01:34 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems to be working fine on 4.2pl3
Reply With Quote
Благодарность от:
BirdOPrey5
  #28  
Old 06-16-2013, 12:49 AM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Our template looks different.

I don't see this, for example, in the code you say to find:

Code:
{vb:raw forumhome_markread_script}
Reply With Quote
  #29  
Old 06-16-2013, 12:47 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code seems to have changed in the template at some point.

In 4.2.1 look for the code:

Code:
<vb:if condition="$forumbits">
{vb:raw template_hook.forumdisplay_above_subforums}
<div id="forumbits" class="forumbits">
	<div class="forumhead">
		<h2>
			<span class="forumtitle">{vb:rawphrase subforums}</span>
			<span class="forumthreadpost">{vb:rawphrase threads_posts}&nbsp;</span>
			<span class="forumlastpost">{vb:rawphrase last_post}</span>
		</h2>
	</div>
	<ol>
		{vb:raw forumbits}
	</ol>
</div>
{vb:raw template_hook.forumdisplay_below_subforums}
</vb:if>
CUT the code above (copy to clipboard then delete from the template)

The FIND this code:

Code:
	<div class="threadpagenav<vb:if condition="!$pagenav AND !$forumjump"> nopagenav</vb:if>">
		{vb:raw pagenav}
		{vb:raw forumjump}
	</div>
</div>
and PASTE the code below that.

That should so the same thing in 4.2.1.

If any problems simple undo or "REVERT" the template to get back the VB default template.
Reply With Quote
Благодарность от:
Amaury
  #30  
Old 06-17-2013, 03:03 AM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
The code seems to have changed in the template at some point.
Thank you.

Now how can I get it so the Post New Thread and Moderation Tools buttons and pagination are below it?
Reply With Quote
  #31  
Old 04-16-2023, 02:43 AM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great on 4.2.6 php 7.2 and birds edit !
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 11:24 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.08949 seconds
  • Memory Usage 2,354KB
  • Queries Executed 28 (?)
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
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (4)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete