Alternate Colours for vbulletin 4 forum rows ( forum home ) and ( forumdisplay )

Other forum platforms like IPB have some very nice styles which allow alternate colour forum rows which allows things to look very smooth indeed. After looking around for a while for some pre-made code i would like to thank the source ( at the bottom of this article ).

This will allow your forums to look like this :
Name:  alternaterow.gifViews: 0Size:  6.3 KB

1. Edit template forumhome_forumbit_level2_post

Add the following code at the top of the template.

<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if> <vb:if condition="!isset($altrow)"> <vb:if condition="$altrow = 0"></vb:if> </vb:if> <vb:if condition="++$altrow % 2 == 0"> <vb:if condition="$rowClass = 'alteven'"></vb:if> <vb:else /> <vb:if condition="$rowClass = 'altodd'"></vb:if> </vb:if>

Credit for the above code goes to William and forumthemes.

Now change the first line (first line before inserting the above code) from

<li id="forum{vb:raw forum.forumid}">

to

<li id="forum{vb:raw forum.forumid}"vBulletin">vb:raw $rowClass}">

2. Edit forumhome_forumbit_level1_post / _nopost

Add the following at the top of forumhome_forumbit_level1_post and forumhome_forumbit_level1_nopost template.

<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if> <vb:if condition="$altrow = 0"></vb:if>

3. Edit Stylevars


!Important :
Edit forumrow_firstentry_background and forumrow_background stylevars and make it transparent by deleting Background Color and Background Image.

To also get this working on the forumdiplay pages you will need to do the following :

Goto threadbit template , at this to the very top :

<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if>
<vb:if condition="!isset($altrow)">
<vb:if condition="$altrow = 0"></vb:if>
</vb:if>
<vb:if condition="++$altrow % 2 == 0">
<vb:if condition="$rowClass = 'alteven'"></vb:if>
<vb:else />
<vb:if condition="$rowClass = 'altodd'"></vb:if>
</vb:if>

And then edit the first line of the code as follows.
Change


<livBulletin">vb:raw thread.statusstring}

To :

<livBulletin">vb:raw $rowClass} {vb:raw thread.statusstring}

4.Edit CSS

Add the following to the additional.css :

.altodd {background-color:#eee;} .alteven {background-color:#fff;}

You can change the colour codes to match the alternating colours as desired.

How People Found us on Google:

Tags:

About Barry

Enthusiastic about Internet marketing i thought it would be fitting to think about starting a New IM forum , I Also have a keen interest in Network management of which Bandwidth Splitter are something im currently playing with.

No comments yet.

Leave a Reply