How to have alternating colored rows (and not columns) in vBulletin 4. After searching around, I found one by William, Very nice work. His solution is for vBulletin 3 but it can be easily ported to vBulletin 4. As I searched, I saw the problem is talked a lot in forums without any solution for vBulletin 4 and so I decided to put together a solution extending William's work.
Add the following code at the top of the template.
Credit for the above code goes to William and forumthemes.
Now change the first line (first line before inserting the above code) from
to
Add the following at the top of
Edit
Now add the following CSS in the additional.css template.
You can customize the above CSS as per your needs.
I hope this helps fellow vBulletin forum webmasters.
1. Edit template forumhome_forumbit_level2_post
Add the following code at the top of the template.
Code:
<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>
Now change the first line (first line before inserting the above code) from
Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2">
Code:
<li id="forum{vb:raw forum.forumid}" class="forumbit_post L2 {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.Code:
<vb:if condition="$altrow =& $GLOBALS['altrow']"></vb:if> <vb:if condition="$altrow = 0"></vb:if>
3. Edit Stylevars
Edit
forumrow_firstentry_background and forumrow_background stylevars and make it transparent by deleting Background Color and Background Image.4.Edit CSS
Now add the following CSS in the additional.css template.
Code:
.altodd {background-color:#eee;}
.alteven {background-color:#fff;}
I hope this helps fellow vBulletin forum webmasters.

Now it has a solution!! 

