vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How can i do this code ? (https://vborg.vbsupport.ru/showthread.php?t=165816)

cagatayh 12-21-2007 09:42 PM

How can i do this code ?
 
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

Quote:

Originally Posted by Liquid1ce (Post 1406898)
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

Quote:

Originally Posted by Paul M (Post 1407033)
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


All times are GMT. The time now is 12:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01018 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete