PDA

View Full Version : How do I tell VB NOT to display ads on custom page?


jderouen
07-01-2012, 12:31 AM
I created a custom VB page using Lynne's tutorial. (https://vborg.vbsupport.ru/showthread.php?t=228112) It worked great! But now I need to make it so that ads don't show up on that page. Right now, we have an ad beneath the navbar and above the footer. What can I do to make these ads not show up on this custom page?

I originally posted the question on vBulletin.com, but as we decided it was a custom question am taking it here instead. Here's the thread from there: https://www.vbulletin.com/forum/showthread.php/403764-Is-there-a-way-to-NOT-show-ads-on-custom-page?p=2310288#post2310288

Any help would be most welcome!!

Thanks,
Joe

Andy
07-01-2012, 12:55 AM
Hi Joe,

From the thread at vbulletin.com you indicated you have a script called museumlinks.php. Sounds like you need to also have a template called museumlinks. That way the code I provided will work.

Do you know how to create templates?

--------------- Added 1341109599 at 1341109599 ---------------

Hi Joe,

I was thinking about your question a bit more and having just gone through this on my site, what I did was end up only showing the banner on my forumhome and search pages. Would this work for you?

jderouen
07-01-2012, 02:45 AM
I am working on this partially for someone else, I will ask re: the ads. Thanks!

Andy
07-01-2012, 02:59 AM
I am working on this partially for someone else, I will ask re: the ads. Thanks!

Be sure to mention that many of the pages like showthread, Private Messages etc., have problems when you put a banner under the navbar. So it's best to not show the banner accept on the two pages I mentioned.

Link14716
07-01-2012, 03:10 AM
At the top of your custom file, look for the THIS_SCRIPT definition:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'test');

Make sure that you have changed it from test to museumlinks. Then, use the if conditional given on vB.com to surround your advertising code:
<vb:if condition="THIS_SCRIPT != 'museumlinks'">
AD CODE HERE
</vb:if>

Andy
07-01-2012, 04:18 AM
Very good Link14716. It's been so long since I created my home custom page I forgot all about the index.php file that I use as my default home page. I run the forum only package with a custom home page.