View Full Version : Alternating Rows... not columns
Jolten
04-19-2004, 01:46 AM
I see this has been asked a couple times with no real answer for vb3 or 3.0.1.
I found a hack that alternates rows in the forumhome_level2_post template but... does anyone know haw to alter the forum display so that the alternating rows carry over to the thread views rather than just on the forum home?
Thanks.
Zachery
04-19-2004, 06:02 AM
It can be done with a template modifcation.. :)
Zachery
04-19-2004, 07:17 AM
<a href="http://www.vbulletin.com/forum/showthread.php?t=100759" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=100759</a>
Jolten
04-19-2004, 04:13 PM
Zachery, I've applied that template modifaction. it adjusts the forum home but it does not adjust the forum display template. Wha tthis means is that the rows alternate on the forum home only. Threads within forums do not alternate rows. They are still alternating columns. I'd like to get threads to alternate rows as well as the forum home.
Jolten
04-20-2004, 02:16 AM
Okay I got closer. By adding the if statement using $thread[threadid] in the threadbits template I got alternating rows. However, the colors are assigned by thread ID so they dont' alternate properly. If someone posts to a thread, it moves up in the list, but retains it's originally assigned class.
So.. with this...
<if condition="$thread[threadid] % 2 == 0">class="alt2"<else />class="alt1"</if> can anyone help me make that statement conditional on the display order of the thread rather than the thread ID? I did try $thread['displayorder'] but that didnt' work at all.
Thanks.
amykhar
04-20-2004, 03:34 AM
what needs to be done is similar to what is done assigning numbers to posts in a thread. postid's are not consecutive either, but posts have consecutive numbers in the postbit.
You need to mimic that code in forumdisplay when creating the list of threads.
Amy
Jolten
04-20-2004, 03:42 AM
Actually I got is sorted thanks to daemon over at vbulletin.com. It actually needed a simpler code in the threadbits template.
add:
<if condition="exec_switch_bg()"></if>
To the top of the template. Then change td classes to $bgclass in the rest of the template
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.