The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to show ad only on the homepage?
I?d like to show an ad in the header of my forum only on the homepage. Below is a code from Header template.
What should I add or change in the code? Thanks in advance. <td width="125"><a href="*******link of the advertiser" rel="nofollow" target="_blank"><img src="advertiser/Emma.jpg" /></td></a> <td style="background: url(images/bigred/gradients/gradient_banner.gif) repeat-x;"></td> |
#2
|
|||
|
|||
PHP Code:
|
#3
|
||||
|
||||
And just to add to the above, that code works if your homepage is 'index.php' if you renamed it to 'forum.php' then use THIS_SCRIPT == 'forum' in the if statement, or whatever else you may have renamed it to without the .php.
|
#4
|
|||
|
|||
I thought THIS_SCRIPT is a constant? So even if it's index.php but the constant is defined "abracadabra" then he'd use "THIS_SCRIPT == 'abracadabra';
|
#5
|
|||
|
|||
Near the top of every page is:
define('THIS_SCRIPT', 'xxxxxxxxx'); xxxxxxx usually is the name of the file w/o the extension.. ie: index is index.php, showthread for showthread.php but sometimes they're different.. so you're both right |
#6
|
||||
|
||||
oh, actually I didn't know about that- thanks.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|