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.

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;}

You can customize the above CSS as per your needs.

I hope this helps fellow vBulletin forum webmasters.

pankaj.sea

6Mar2011 08:08

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

Nice tutorial Shabbir!
:)
This was a very common question for webmasters at vBulletin.Org forum! ;) Now it has a solution!!
Thanks!

shabbir

6Mar2011 09:00

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

Thanks and if you see someone looking for something now you know what to do?

pankaj.sea

6Mar2011 09:03

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

Quote:

Originally Posted by shabbir
(Post 80311)

Thanks and if you see someone looking for something now you know what to do?

Sure... ;)

Adam H

30Apr2011 18:56

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

This is a great work around , however i can not seem to get it working on the forumdisplay page . I.e the sub forums above the threadbits, Any ideas ?

shabbir

1May2011 09:59

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

You should be. What are you trying on the forumdisplay? I tried myself and it just works fine

Adam H

1May2011 14:21

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

Quote:

Originally Posted by shabbir
(Post 82547)

You should be. What are you trying on the forumdisplay? I tried myself and it just works fine

I have just followed your instuctions above , the forumhome is working great however when i click a forum category which has sub forums those subforums are not styled in the same way, is there more code that i have to add to the forumdisplay template ?

shabbir

1May2011 16:27

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

Quote:

Originally Posted by Adam H
(Post 82551)

I have just followed your instuctions above , the forumhome is working great however when i click a forum category which has sub forums those subforums are not styled in the same way, is there more code that i have to add to the forumdisplay template ?

sub forums will work if they are at level1 but if you have them as level 2 then you may need to edit those templates. Also you can make the same logic even applied to showthread.

Adam H

1May2011 16:40

Re: Alternating Colored Rows in vBulletin 4 [No Plugin]

Quote:

Originally Posted by shabbir
(Post 82552)

sub forums will work if they are at level1 but if you have them as level 2 then you may need to edit those templates. Also you can make the same logic even applied to showthread.

I do not suppose you could tell me how to get the level 2 working and the showthread too ? I seem to be going around in circles when i edit certain templates.