Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Better Sub-Forum Placement Details »»
Better Sub-Forum Placement
Version: 1.00, by Slave Slave is offline
Developer Last Online: Aug 2010 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 11-12-2005 Last Update: 11-12-2005 Installs: 13
Template Edits
 
No support by the author.

Hack:
Better Sub-Forum Placement

Inspired by the "Better Similar Threads Placement" hack which can be found at the following URL:
https://vborg.vbsupport.ru/showthread.php?t=81453

Author:
Slave

vBulletin Version:
Tested on 3.5.1 - but should work on all 3.5 versions.

Problem:
If you have a large amount of Sub-Forums within a forum users have to scroll past them to view threads.

Solution:
This hack places the list of Sub-Forums within a drop-down menu meaning no more scolling for your users. If the forum in question has no threads and only Sub-Forums, the Sub-Forums are shown as normal.

Install time:
About 2 mins, if that!

Number of Templates to edit:
1

Instalation Instructions:

Open your default FORUMDISPLAY template ..

----------------------------

FIND:
Code:
<if condition="$show['forumslist']">
<!-- sub-forum list  -->
ABOVE that add:
Code:
<if condition="$show['threadslist']">
<else />
----------------------------

FIND:
Code:
<br />
<!-- / sub-forum list  -->
BELOW that add:
Code:
</if>
----------------------------

FIND:
Code:
	<td class="vbmenu_control" id="forumsearch"><a href="#goto_forumsearch">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
	</if>
BELOW that add:
Code:
	<if condition="$show['forumslist']"><td class="vbmenu_control" id="relatedtools"><a href="#goto_relatedtools">Sub Forums</a> <script type="text/javascript"> vbmenu_register("relatedtools"); </script></td></if>
----------------------------

FIND:
Code:
<!-- popup menu contents -->
BELOW that add:
Code:
<!-- related tools menu -->
<if condition="$show['forumslist']">
<div class="vbmenu_popup" id="relatedtools_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
<tr></td>
<!-- sub-forum list  -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" align="center">
<thead>
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead" width="175">$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>
<!-- / sub-forum list  -->
</td></tr>
	</table>
</div>
</if>
<!-- / related tools menu -->
----------------------------

That it!
Save FORUMDISPLAY and you've done.

Show Your Support

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

Comments
  #2  
Old 11-13-2005, 10:38 AM
Slave's Avatar
Slave Slave is offline
 
Join Date: Nov 2001
Posts: 439
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a screen shot of how it looks once the hack is added ..

If you'd like to see it in action pop along to ..

http://www.savageforums.com

.. and pick any forum with a subforum within it ..
Reply With Quote
  #3  
Old 11-13-2005, 10:48 AM
G-Force 199's Avatar
G-Force 199 G-Force 199 is offline
 
Join Date: Nov 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack. Thank you
First clicked Install
Reply With Quote
  #4  
Old 11-13-2005, 10:58 AM
Slave's Avatar
Slave Slave is offline
 
Join Date: Nov 2001
Posts: 439
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, thanks G-Force ..

This is my first "hack" .. so I'm glad you liked it.
Reply With Quote
  #5  
Old 11-13-2005, 04:42 PM
Brent H's Avatar
Brent H Brent H is offline
 
Join Date: Sep 2004
Location: Phoenix, AZ
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to put this on the main forum index?
Reply With Quote
  #6  
Old 12-06-2005, 06:23 PM
fyjpm's Avatar
fyjpm fyjpm is offline
 
Join Date: Oct 2005
Location: Buffalo, NY
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*NOTE* if you are using GARS, then the template you will need to change is GARS_forumdisplay not FORUMDISPLAY

First bug (well actually this is an instructions bug): for vB3.5.1 search phrase is wrong:

Code:
	<td class="vbmenu_control" id="forumsearch"><a href="#goto_forumsearch">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
	</if>
Search for this instead:

Code:
	<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
	</if>
Second bug: replace phrase is wrong:

Code:
	<if condition="$show['forumslist']"><td class="vbmenu_control" id="relatedtools"><a href="#goto_relatedtools">Sub Forums</a> <script type="text/javascript"> vbmenu_register("relatedtools"); </script></td></if>
Replace with this instead:

Code:
	<if condition="$show['forumslist']"><td class="vbmenu_control" id="relatedtools"><a href="$show[nojs_link]#goto_relatedtools">Sub Forums</a> <script type="text/javascript"> vbmenu_register("relatedtools"); </script></td></if>
Third bug: typo on <td> tag: the following is wrong (even check it on your board, does work right in FF)

Code:
<!-- related tools menu -->
<if condition="$show['forumslist']">
<div class="vbmenu_popup" id="relatedtools_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
<tr></td>
<!-- sub-forum list  -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" align="center">
<thead>
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead" width="175">$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>
<!-- / sub-forum list  -->
</td></tr>
	</table>
</div>
</if>
<!-- / related tools menu -->
Add this instead:

Code:
<!-- related tools menu -->
<if condition="$show['forumslist']">
<div class="vbmenu_popup" id="relatedtools_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
<tr><td>
<!-- sub-forum list  -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" align="center">
<thead>
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead" width="175">$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>
<!-- / sub-forum list  -->
</td></tr>
	</table>
</div>
</if>
<!-- / related tools menu -->
Now it works right! BTW, aside from the easy debugging, this script KICKS IT! Nice job!

-John
Reply With Quote
  #7  
Old 12-06-2005, 06:49 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea, but I'd imagine that a lot of users who are unfamiliar with forums (ok, so there's probably not going to be that many) wouldn't know those Sub-Forums existed.
Reply With Quote
  #8  
Old 05-18-2006, 12:05 PM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ermm looks kinda funny in FF, any chance on fixing?
Reply With Quote
  #9  
Old 06-02-2006, 04:09 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Smiry Kin's
ermm looks kinda funny in FF, any chance on fixing?
any help?
Reply With Quote
  #10  
Old 06-04-2006, 09:19 PM
Slave's Avatar
Slave Slave is offline
 
Join Date: Nov 2001
Posts: 439
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Smiry Kin's
any help?
I'm afriad I don't use FF .. so unless someone else has any suggestions ........
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 09:27 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.04804 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
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
  • (14)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete