I'd like to make it so that every other post has a variation of the style. Like a bit lighter, or a bit darker. This is done on SMF and many other forums.
What I have in mind is...
PHP Code:
// In post array...
// Written like this to be expanded.
if ($altpost <= 2) {
$altpost = $altpost + 1}
else{
$altpost = 1}
And for the template.
HTML Code:
<if condition="$altpost==1">
show default element
<else />
show alternate style element
</if>
That's simple I don't see why it wouldn't work. Could also use ( modulo($postnumber, altstyle) == 0 ) but thats a waste. postnumber being the number of the post in that thread, starter post is 1.
My question is, how would I put this into the code exactly? I don't understand how the source and template work together.