How To Put Subforums Into Columns

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    How To Put Subforums Into Columns

    I tested the old instructions on version 3.5 and they work exactly the same. Note that the limitation described in the second post in the old thread still applies to 3.5.

    Here are some improved instructions that allow you to specify any number of columns instead of just 2. Note that these improved instructions still suffer from the same limitation described in the second post in the old thread.

    Edit these 4 templates:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_forumbit_*

    Replace this code:

    Code:
    		<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
    With this code:

    Code:
    		<if condition="$show['subforums']">
    
    			<if condition="$GLOBALS[subrow] = 0"></if>
    
    			<table width="100%" cellpadding="1" cellspacing="0" border="0">
    
    			<tr>
    
    				<td width="50%" align="left" colspan="2"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>:</div></td>
    
    			</tr>
    
    			<tr>
    
    				$forum[subforums]
    
    			</tr>
    
    			</table>
    
    		</if>
    Delete the contents of both of these templates:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_subforumseparator_*

    Next edit these 2 templates:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_subforumbit_*

    Add the red code to both templates:

    Code:
    [color=red]<if condition="$GLOBALS[subrow] == [color=blue]X[/color]">
    
    	<if condition="$GLOBALS[subrow] = 1"></if>
    
    	</tr><tr>
    
    <else />
    
    	<if condition="$GLOBALS[subrow]++"></if>
    
    </if>
    
    <td width="50%" align="left" nowrap="nowrap">
    	<div class="smallfont">[/color]
    	<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
    	[color=red]</div>
    </td>[/color]
    Where X is the number of columns you want.

    The end result will look like this (if X = 2):

    [ATTACH]12915[/ATTACH]
    [ATTACH]12916[/ATTACH]
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...