Spacing Subforums In A Table

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

    Spacing Subforums In A Table

    See the attached picture to see what this does.

    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] = false"></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>
    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_subforumseparator_post and forumhome_subforumseparator_nopost

    Delete the contents of both templates.

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_subforumbit_post and forumhome_subforumbit_nopost

    Add the red code to both templates:

    Code:
    [color=red]<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>
    
    <if condition="$GLOBALS[subrow]">
    
    	</tr><tr>
    
    </if>
    
    <if condition="$GLOBALS[subrow] = !$GLOBALS[subrow]"></if>[/color]
    The end result will look like the attached picture.

    edit: added <div class="smallfont">...</div> to the forumhome_subforumbit_* templates so the subforum links are small like in the default style.
    Attached Files
    Last edited by Jake Bunce; Mon 21 Feb '05, 6:01pm.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Apparently this mod has problems when the subforums are parents themselves and their children are too deep for the list. Take this forum tree for example, where the red forums are the ones displayed as subforums:

    cat1
    --forum1
    ----subforum1
    ----subforum2
    ----subforum3

    --forum2
    --forum3


    This forum tree works fine in my tests. However, using this next forum tree as an example:

    cat1
    --forum1
    ----subforum1
    ------subsubforum1
    ------subsubforum2

    ----subforum2
    ----subforum3

    --forum2
    --forum3


    This tree results in messed up tables in my tests when the subsubforums are beyond the depth of the subforum listing. However, if you set your forums to display 2 levels of subforums then it works again.

    I haven't been able to come up with a fix. In the meantime, this mod apparently only works when the subforum listing includes the entire subtree of forums.
    Last edited by Jake Bunce; Sun 6 Feb '05, 4:52pm.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...