vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Condition worked in 4.0.1, but not in 4.0.2 (https://vborg.vbsupport.ru/showthread.php?t=236617)

Paul M 10-07-2016 12:31 PM

Impossible to be sure without some sort of context.

What code is around it, where have you actually put this ?

Curious Too 10-07-2016 03:22 PM

Quote:

Originally Posted by Paul M (Post 2576705)
Impossible to be sure without some sort of context.

What code is around it, where have you actually put this ?

I have this at the end of the postbit legacy template. I'm trying to get an ad to show every x number of posts.

Lynne 10-07-2016 09:02 PM

I just added this code to the very end of my postbit_legacy template and it shows after post 5, 10, 15, and 20 (other than the formatting being bad):

HTML Code:

<vb:if condition="(THIS_SCRIPT == 'showthread') AND (($post['postcount'] % 5) == 0)">
<div class="attachments" align=center>
This is a test.
</div>
</vb:if>


Curious Too 10-08-2016 09:54 AM

Thank you Lynne. It works by itself but when I combine it with another conditional to only shoe the ad in specific forums it only shows the ad once:

Code:

<vb:if condition="(THIS_SCRIPT == 'showthread') AND (($post['postcount'] % 5) == 0) AND in_array($GLOBALS['forumid'], array(419,232))">
Any ideas?

Paul M 10-08-2016 12:55 PM

How about you post the full code you are using.

First you post some snippet and claim it doesnt work (when it looks fine).
Lynne uses that exact same code, which works, and now suddenly it works for you ?
Except you now you claim some other code doesnt work (which again, on the face of it, looks fine).

We cannot help you if you dont give us all the information.


All times are GMT. The time now is 01:56 PM.

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.01069 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete