vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   VB Condition to show Ads in certain forums only (https://vborg.vbsupport.ru/showthread.php?t=272986)

popular 10-28-2011 11:48 PM

VB Condition to show Ads in certain forums only
 
I'm trying to disable ads in certain forum sections, I tried this

<vb:if condition="$forum[forumid] != 42">
ad code
</vb:if>

where 42 is the forum section I don't want ads to show, this doesn't seem to work. anyone know why?

kh99 10-28-2011 11:53 PM

$forum[forumid] might not be the right variable to check. It depends on what template you're putting the code in - assuming you are putting it in a template. [S]If you're putting it in the ad html, that's probably why it isn't working.[/S] Edit: that's wrong - you *can* put conditionals in the ad code.

popular 10-29-2011 12:13 AM

I've tried putting it in several templates some that were created by mod and default templates.

SHOWTHREAD
ad_global_above_footer
postbit_legacy_ads_after_firstpost

I tried all the same condition in all three templates and it doesn't seem to work. What other variables could I use to get this to work?

Thanks!

kh99 10-29-2011 12:55 AM

Actually I just noticed this in the "Similar Threads" below: https://vborg.vbsupport.ru/showthread.php?t=250513

So that might help you. It also seems to say that you *can* put it in the ad code, so maybe I'm wrong about that (I'll check the code when I get a chance).

Edit: no need to check the code, it says right on the ad editing page that conditionals *are* allowed. So, try the one at the link above.

popular 10-29-2011 01:58 AM

thanks kh99, worked :)


All times are GMT. The time now is 09:13 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.02111 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete