View Full Version : Condition Question for Postbit
Lizard King
07-12-2006, 07:59 AM
I am trying to accomplish a condition.
The condition will be about the post numbers.
<if condition ="$post[postcount] even >
<else />
</if>
Hope i could explain. What i am trying to accomplish is to have 2 different layout on postbit template. If the postcount number is odd the layout will look like
avatar ---------- thread information
if the postcount is even
thread information ---------- avatar
Lizard King
07-19-2006, 07:06 AM
bump
also let me try to explain a little bit further.
In showthread i want to heva two different kind of postbit's. one will have the avatar on left side with background color for example #ffffff and second post will have the avatar on right side with background color #f7f7f7
I attached a screenshot about what i am trying to accomplish. Any help will be really apreciated.
SaintDog
07-19-2006, 09:33 AM
Have you tried using
<if condition="$post[postcount] % 2">
first postbit data
<else />
second postbit data
</if>
Not sure if it will work, though a previous modification I did required alternating bits and this worked for it.
Lizard King
07-19-2006, 10:50 AM
Have you tried using
<if condition="$post[postcount] % 2">
first postbit data
<else />
second postbit data
</if>
Not sure if it will work, though a previous modification I did required alternating bits and this worked for it.
Yep that did the trick :) Thanks
SaintDog
07-19-2006, 04:32 PM
No problem, glad it worked out for you :).
Sha Platinum?
07-23-2006, 01:28 PM
Helped Me too.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.