View Full Version : Alternate row colors
hexonxonx
11-28-2003, 05:24 AM
Hi
I have searched and searched and can't find the alternationg row colors mod here anywhere, or at least one that will work with 2.3.2. Can anyone provide the code for this? I don't want the colors to alterate for the colums, just the rows for forumhome and showthreads,
Thanks!
Dean C
11-28-2003, 03:27 PM
It needs hacking - you can't do it just in templates (AFAIK) - needs 4 lines of code I think. So moved to hack requests :)
Michi
06-14-2004, 02:05 PM
You can do it quite simply for Forumdisplay like this:
Find in forumdisplay.php: while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
Right after that, add:
if($oror++ % 2 == 0)
{
$tread[color] = "{secondaltcolor}";
}
else
{
$tread[color] = "{firstaltcolor}";
}
And thats that. Then just add bgcolor="$tread[color]" to table cells in the template you want. You can also rename the variables "$oror" and $tread[color] to whatever you want.
And, if you're clever, you can also add the same thingy to what ever loop that lists threads, topics, posts etc.
Berethorn
07-02-2004, 02:28 PM
I don't know much about PHP code - I'm trying to figure out how to alternate the colors for each POST, not for each column. Any way to alter this code to accomplish that? :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.