The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hello everyone,
While I am not sure that something like this exists for vBulletin conditionals, I thought of asking if someone knows a way how to implement odd and even numbers within a <if> conditional for postcounts. Please look at this post for more info. https://vborg.vbsupport.ru/showpost....9&postcount=19 I know from maths , that odd numbers in general are represented by (2x+1) while even numbers are presented with (2x), with x being a full number greater or equal to zero.Thanks you for your time. Regards, Val. |
|
#2
|
||||
|
||||
|
Code:
<if condition="$post['postcount'] % 2">
odd
<else />
even
</if>
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|