How To Put A Space Between Each Forum Category

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

    [vB 3.6] How To Put A Space Between Each Forum Category

    I tested the old instructions on version 3.5 and they appear to work exactly the same. No changes are needed. Here are the same instructions with some improvements:

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

    Add the blue code:

    Code:
    [color=blue]</table>
    
    <br />
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">[/color]
    
    <tbody>
    	<tr>
    		<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
    			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
    			<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
    			<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
    			<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
    		</td>
    	</tr>
    
    	[color=blue]<tr align="center">
    	  <td class="thead">&nbsp;</td>
    	  <td class="thead" width="100%" 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>[/color]
    </tbody>
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    $childforumbits
    </tbody>
    </if>
    You might also need to add the green code if you have the problem shown in this picture:

    [ATTACH]16300[/ATTACH]

    Code:
    [color=green]<if condition="$forum[forumid] != X">[/color]
    [color=blue]</table>
    
    <br />
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">[/color]
    [color=green]</if>[/color]
    
    <tbody>
    	<tr>
    		<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
    			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
    			<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
    			<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
    			<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
    		</td>
    	</tr>
    
    	[color=blue]<tr align="center">
    	  <td class="thead">&nbsp;</td>
    	  <td class="thead" width="100%" 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>[/color]
    </tbody>
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    $childforumbits
    </tbody>
    </if>
    Where X is the forumid of the top category on the page. This will prevent the forum listing table from being restarted for that category.

    If you end up with an extra table header like in this picture:

    [ATTACH]16301[/ATTACH]

    ...then you can make the following changes to get rid of it:

    Admin CP -> Styles & Templates -> Style Manager -> &#171; &#187; -> Forum Home Templates -> FORUMHOME

    Remove the red code:

    Code:
    <!-- main -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <thead>
    	<if condition="$show['guest']">
    	<!-- guest welcome message -->
    	<tr>
    		<td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
    	</tr>
    	<tr>
    		<td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
    			<phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
    		</td>
    	</tr>
    	<!-- / guest welcome message -->
    	</if>
    	[color=red]<tr align="center">
    	  <td class="thead">&nbsp;</td>
    	  <td class="thead" width="100%" 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>[/color]
    </thead>
    $forumbits
    <tbody>
    Admin CP -> Styles & Templates -> Style Manager -> &#171; &#187; -> Forum Display Templates -> FORUMDISPLAY

    Remove the red code:

    Code:
    <if condition="$show['forumslist']">
    <!-- sub-forum list  -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
    <tr>
    	<td class="tcat" width="100%">$vbphrase[subforums]<span class="normal">: $foruminfo[title]</span></td>
    	<if condition="$show['forumsearch']">
    	<td class="vbmenu_control" id="forumsearch.subforums"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></td>
    	</if>
    </tr>
    </table>
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <thead>
    	[color=red]<tr align="center">
    	  <td class="thead">&nbsp;</td>
    	  <td class="thead" width="100%" 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>[/color]
    </thead>
    $forumbits
    </table>
    <br />
    <!-- / sub-forum list  -->
    </if>
    After applying this mod, if you have problems with the category columns being misaligned:

    [ATTACH]16302[/ATTACH]

    ...then see How To Change the Width of the Forum List Columns.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...