vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   How to use condition: if on this page, don't show ads to anybody (https://vborg.vbsupport.ru/showthread.php?t=260847)

Breixo 03-23-2011 10:22 PM

How to use condition: if on this page, don't show ads to anybody
 
I was looking for a code to do this but I can't find it.
I would like to remove ads on register.php
Is it possible to use a condition like:
<vb:if condition="is on register.php">Ads removed</vb:if>

Thanks in advance!

PD: I think this is a way to boost new members as it would be easier to register.

TheLastSuperman 03-23-2011 11:58 PM

Show in only one file: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you want it to show in.
Code:

<vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>

Show in every file but one: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you do not want it to show in.
Code:

<vb:if condition="THIS_SCRIPT != 'calendar'">Show this only on calendar.php</vb:if>
From:
https://vborg.vbsupport.ru/showthread.php?t=231525

Breixo 03-24-2011 08:39 AM

Thanks for your quick reply.
I was trying to use it but I can't find a way:
My ads are shown using vbulletin ad manager:
Code:

<div id="ad_global_below_navbar">
On register.php I found:
Code:

<script type="text/javascript">
<!--
        var SESSIONURL = "";
        var SECURITYTOKEN = "guest";
        var IMGDIR_MISC = "http://xxxxxxxxxxxxx";
        var IMGDIR_BUTTON = "http://xxxxxxxxxxxxx";
        var vb_disable_ajax = parseInt("0", 10);
        var SIMPLEVERSION = "412";
        var BBURL = "http://xxxxxxxxxxxxx";
        var LOGGEDIN = 0 > 0 ? true : false;
        var THIS_SCRIPT = "register";
        var RELPATH = "register.php";
        var PATHS = {forum : ""}
// -->
</script>

I tried to change it to
Code:

<vb:if condition="THIS_SCRIPT != 'register'">Don't show on register.php</vb:if>
But I don't know the right place to add this code in order to remove ads.
Thanks for your time!

Lynne 03-24-2011 03:16 PM

You are using the Advertising tab in the admincp? So put Mikes code around your ad code that you entered into the Ad HTML box.

Breixo 03-25-2011 06:48 AM

Thanks!!
I wrote:
Code:

<vb:if condition="THIS_SCRIPT != 'register'">
HTML
</vb:if>

and now it works, thanks for your help!

PS: I wanted to avoid ads on two pages, so I wrote:
Code:

<vb:if condition="THIS_SCRIPT != 'register' AND THIS_SCRIPT != 'gdirect'">


All times are GMT. The time now is 09:54 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.01006 seconds
  • Memory Usage 1,729KB
  • 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
  • (7)bbcode_code_printable
  • (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