View Full Version : How can i do this code ?
cagatayh
12-21-2007, 09:42 PM
I want to show my adv. in my forum. I want to this code but I want different one.
<if condition="$post[postcount] == 21">
I want to show my adv. in 21. , 31. ,41., 51.....
but there is a lot of if cause.
I want to 1 code to show a adv in *1,
Thanks
Liquid1ce
12-22-2007, 04:01 PM
did u try
<if condition="$post[postcount] == 21,31,41,51"> ??
cagatayh
12-22-2007, 06:19 PM
Parse error: syntax error, unexpected ',' in /home/abc/public_html/includes/adminfunctions_template.php(3596) : eval()'d code on line 150
Paul M
12-22-2007, 06:49 PM
did u try
<if condition="$post[postcount] == 21,31,41,51"> ??
You cannot do that.
Try
<if condition="$post[postcount] % 10 == 1">
cagatayh
12-22-2007, 07:24 PM
Thanks, really thanks
valdet
12-22-2007, 11:16 PM
You cannot do that.
Try
<if condition="$post[postcount] % 10 == 1">
Hi Paul It seems it worked for cagatayah.
Just for my knowledge, can you please tell me how is the % interpreted in vBulletin code.
I recently had another example % 2 . Does % means "after" X posts ?
Thanks.
Val.
C.ooder
12-23-2007, 12:30 AM
worked ?
Opserty
12-23-2007, 12:35 PM
[QUOTE=valdet;1407179]
Just for my knowledge, can you please tell me how is the % interpreted in vBulletin code./QUOTE]
Its PHP not vBulletin Code. Arithmetic Operators (http://uk.php.net/operators.arithmetic)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.