![]() |
Alternate rows ala SitePointForums
Anyone want to make a hack to have the tables show up as on http://www.sitepointforums.com/ ?
I tried with templates but couldnt get it to work, so I think someone will have to hack something :P |
Quote:
|
Quote:
|
This is how I do it:
PHP Code:
|
PHP Code:
PHP Code:
you should comment them out PHP Code:
PHP Code:
|
PHP Code:
|
Remember when using this that the display order in the forums HAS to be numbered like this:
101 102 103 104 If you number your forums like I used to: 100 110 120 130 it won't work. |
All the code here is pretty redundant, vB3 has a function already to switch the background colors: exec_switch_bg() and use $bgclass in place of alt1/alt2 in the HTML.
|
Quote:
|
HTML Code:
<if condition="exec_switch_bg()"> |
Quote:
|
HTML Code:
<if condition="exec_switch_bg()"> |
Quote:
|
It already knows what, if anything the previous one was, however I'm sure you can override it with a parameter, but I don't have a copy of functions.php with me at the moment.
|
Quote:
|
Any idea how i could make this work for posbit only?
|
Setting up an initial value should be as easy as
Code:
<if condition="$bgclass='alt2'"> |
is their a way to acheive this without all of the conditionals?
|
Can someone explain carefully where to place all this code? I'm trying to get the post colors to alternate.
|
All times are GMT. The time now is 04:50 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:
|