How To Insert A Banner Between Categories

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

    How To Insert A Banner Between Categories

    This picture shows the banner location in question:

    [ATTACH]17700[/ATTACH]

    ...and this picture shows what this mod does (you would replace the text with banner code):

    [ATTACH]17699[/ATTACH]

    Adding The Banner
    Edit this template:

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

    Add the red code to the top of the template:

    Code:
    [color=red]<if condition="$forum[forumid] == [color=blue]X[/color]">
    
    	</table>
    
    	<br />
    	<div align="center">
    		[color=blue]BANNER CODE HERE[/color]
    	</div>
    	<br />
    
    	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    	<thead>
    		<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>
    	</thead>
    
    </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>
    </tbody>
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    $childforumbits
    </tbody>
    </if>
    Where X is the forumid of the category below the banner (named "Second Category" in the picture). Replace the blue code with your banner code.

    Alignment Problems
    If you have alignment problems like in this picture:

    [ATTACH]16302[/ATTACH]

    ...then you can apply the How To Change the Width of the Forum List Columns mod to the red code above and in the FORUMHOME and FORUMDISPLAY templates as described in that thread.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...