Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Arrange Sub-Forums in columns Details »»
Arrange Sub-Forums in columns
Version: 1.00, by tamarian tamarian is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-04-2004 Last Update: Never Installs: 138
 
No support by the author.

There's also a vB 3.5 version here: https://vborg.vbsupport.ru/showthrea...threadid=82845

What it does
This hack arranges sub-forums on the forum home into 2 (or more) columns, makeing large lists of sub-forums more presentable. You can see it in action on my forums here:

Demo
http://forum.lowcarber.org

Note:
1. You need to enable sub-forum display on the forum home from your vB admin panel
2. This hack is for the forum home page, not forum display.


To enable sub-forums on the forum home page
1. Go to your forum Admin panel
2. Click vBulletin Options
3. Select "Forum Listings Display Options" from the drop down list
4. In "Depth of Sub-Forums" replace 0 with 1

Installation
To install, edit the file functions_forumlist.php (in the includes directory)

1. Find

PHP Code:
      foreach($vbulletin->iforumcache["$parentid"] AS $forumid
Place this code above it:

PHP Code:
$output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
      
$cols 0
2. Find
PHP Code:
            eval('$subforum = "' fetch_template("forumhome_subforumbit_$canpost") . '";');
            if (!empty(
$output))
            {
                
$subforum $splitter["$canpost"] . $subforum;
            }
            if (
$depth $vbulletin->options['subforumdepth'])
            {
                
$output .= construct_subforum_bit($forumid$cancontainthreads$subforum$depthmark '--'$depth 1);
            }
        }
    }

    return 
$output;


Replace with
PHP Code:
            eval('$subforum = "' fetch_template("forumhome_subforumbit_$canpost") . '";');
                    if (
$depth $vbulletin->options['subforumdepth'])
                        {
                                
$cols++;
                                if (
$cols==3)
                                        {
                                        
$cols 1;
                                        
$output .=  "</tr><tr>";
                                        }

                        
$output .= '<td width="50%">' construct_subforum_bit($forumid$cancontainthreads$subforum$depthmark '--'$depth 1) . "</td>";
                        }
        }
    }

        if (
$cols ==1$output.="<td>&nbsp;</td></tr></table>";
    else 
$output.="</tr></table>";

        return 
$output;


To put them in 3 columns, instead of t2, just edit this line "if ($cols==3)" to "if ($cols==4)" and change this line:

PHP Code:
                  $output .= "<td width=\"50%\">" construct_subforum_bit($forumid$cancontainthreads$subforum$depthmark '--'$depth 1) . ""
To this:
PHP Code:
                  $output .= "<td width=\"33%\">" construct_subforum_bit($forumid$cancontainthreads$subforum$depthmark '--'$depth 1) . ""
Template modification (optional)
As this hack will list the sub-forums in a table, the font used is not effected by the <div> tag for subforums, which will cause the default font to be used instead of smallfont.

To use smallfont for sub-forum names, edit the "forumhome_subforumbit_post"

Change (this is the whole template)
Code:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
To:
Code:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span class="smallfont">$forum[title]</span></a>

And for those who want to edit or remove the "Sub-forum" word, just remove (or edit, if you just want to change it) "<strong>$vbphrase[subforums]</strong>:" from the "forumhome_forumbit_level2_post" template

Screen shots, before/after

Show Your Support

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

Comments
  #192  
Old 10-06-2005, 04:33 PM
osariase osariase is offline
 
Join Date: Mar 2005
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did what was instructed and my forums changed but not like you have yours am I missing something?

picture of my forums display below
Reply With Quote
  #193  
Old 10-06-2005, 05:40 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by osariase
I did what was instructed and my forums changed but not like you have yours am I missing something?

picture of my forums display below
Undo the changes, and re-apply the steps. There was a minor code change.
Reply With Quote
  #194  
Old 12-03-2005, 08:51 AM
richiepearce richiepearce is offline
 
Join Date: Jan 2005
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am trying to add this mod to my forum but cannot find the first line of code to be changed. I have added my file, can someone please take a look for me and advise what needs to be changed.

Many Thanks,
Richie :nervous:
Reply With Quote
  #195  
Old 12-03-2005, 10:22 AM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by richiepearce
I am trying to add this mod to my forum but cannot find the first line of code to be changed. I have added my file, can someone please take a look for me and advise what needs to be changed.

Many Thanks,
Richie :nervous:
I see it at line 520. Please delete the file you uploaded.
Reply With Quote
  #196  
Old 12-03-2005, 10:51 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please do not upload vBulletin files

Chris
Reply With Quote
  #197  
Old 12-05-2005, 09:13 AM
richiepearce richiepearce is offline
 
Join Date: Jan 2005
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris M
Please do not upload vBulletin files

Chris

OK, sorry, forgot that was not allowed. Thanks for highlighting the line for me.
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 05:27 AM.


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.08087 seconds
  • Memory Usage 2,298KB
  • Queries Executed 21 (?)
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
  • (2)bbcode_code
  • (6)bbcode_php
  • (3)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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