Back to vBulletin 3.5 Add-ons

Arrange Sub-Forums in columns
Mod Version: 1.00, by tamarian

This modification is in the archives.
vB Version: 3.5.1 Rating: (4 votes - 4.50 average) Installs: 122
Released: 10 Jun 2005 Last Update: 05 Aug 2005 Downloads: 114
Not Supported Template Edits Code Changes  

Better alternatives to this hack:
3.6 plugin version by Cybernetec with more options:
Cyb - Sub-Forum Manager

3.5 plugin version by Atakan KOC: Arange Subforum

CSS/templates version by hpwilhelm:
CSS - Sub-Forum-List in Columns
Ported from 3.0.x.

What it does
This hack arranges sub-forums on the forum home into 2 columns, makeing large lists of sub-forums more presentable. You can see the before/after in the screenshots attached

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 includes/functions_forumlist.php

1. Find (there are two slightly different lines, differing by a space, the one in question is around line 552)

PHP Code:
    if (!isset($vbulletin->iforumcache["$parentid"]))
    {
        return 
$output;
    } 
Place this code below it:

PHP Code:
 $output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
      
$cols 0
2. Find
PHP Code:
            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:
                        //sub-forum hack
            
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;

}
//end hack 
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.

handling of sub-forums.

Download

This modification is archived and cannot be downloaded.

Screenshots

   

Similar Mods

Arrange Sub-Forums in columns vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024