![]() |
Forum row alternating colors
I just found a website telling how to do it but the author didn't say which template to edit. If someone could please look at this code and let me know which templates to edit, that would be greatly appreciated. Thanks.
Code:
With the release of vBulletin 4.x.x, I found myself searching for new updated code for alternating row color for the new vBulletin 4. You will see from another post within our Helpful Tips, Tricks & Articles we have an example of how to use this within vBulletin 3.x so we hope you will understand how to use this code without me having to go into to much detail. |
Interesting.
|
Anyone at all?
|
Heres a little more info from his posts on that site which may help you out! How it works: The way the colors are currently assigned is via CSS classes. The template changes remove the class definitions from the table cells, and add class definitions to the displayed rows. The CSS Classes used are the "Alt1" and "Alt2" classes - defined in the Admin Control Panel under Style Manager, (style), Main CSS, "First Alternating Color" and "Second Alternating Color". Place the following code at the top of each template you want to alternate colors. Code: <if condition="$altrow =& $GLOBALS['altrow']"></if> <if condition="!isset($altrow)"> <if condition="$altrow = 0"></if> </if> <if condition="++$altrow % 2 == 0"> <if condition="$rowClass = 'alt1'"></if> <else /> <if condition="$rowClass = 'alt2'"></if> </if> threadbit template updates 1) On the very first line, change Code: <tr> to Code: <tr class="$rowClass"> 2) search and remove: 2) Find all ' class="alt1"' and remove 3) Find all ' class="alt2"' and remove forumhome_forumbit_level1_post updates 1) On the second line, change Code: <tr align="center"> to Code: <tr class="$rowClass" align="center"> 2) search and remove: 2) Find all ' class="alt1"' and remove 3) Find all ' class="alt2"' and remove 4) Find all ' class="alt1Active"' and remove forumhome_forumbit_level2_post 1) On the very first line, change Code: <tr> to Code: <tr class="$rowClass"> 2) search and remove: 2) Find all ' class="alt1"' and remove 3) Find all ' class="alt2"' and remove 4) Find all ' class="alt1Active"' and remove pm_messagelistbit 1) On the very first line, change Code: <tr> to Code: <tr class="$rowClass"> 2) search and remove: 2) Find all ' class="alt1"' and remove 3) Find all ' class="alt2"' and remove 4) Find all ' class="alt1Active"' and remove memberlist_resultsbit 1) change Code: <tr align="center"> to Code: <tr class="$rowClass" align="center"> 2) search and remove: 2) Find all ' AND exec_switch_bg()"' and remove 3) Find all ' class="$bgclass"' and remove 4) Find all ' class="alt1Active"' and remove 5) Find all ' class="alt2"' and remove |
If this is for rows, <tr>, and the old alt colors, alt1 and al2, then it's not going to work for vB4 without a bit more tweaking than what has been posted.
|
Does anyone know of a complete guide on how to do this with VB 4.1.2?
|
Quote:
|
Quote:
|
All times are GMT. The time now is 12:39 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|