Quote:
Originally Posted by LoOnEyToOnZ
Thanks guys for the information
vbmechanic - how do i change it to load the PHP ? Like you mentioned....
|
Use "Local Mode" invocation instead. Get the code like:
PHP Code:
<?php
if (@include(getenv('DOCUMENT_ROOT').'/adserver/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>
See up there, it has an include? That includes the ad server software. You can take this PHP code and put it wherever you like-- at the end of global.php or in the php_include part of your header would work as well. Instead of "echoing" the raw variable like:
echo $phpAds_raw['html'];
instead set it to a variable like:
$bannerad = $phpAds_raw['html'];
Then wherever you want the banner ad to appear, you put $bannerad in your template. You can also load multiple ads this way, by calling this set of lines multiple times:
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$banneradtop = $phpAds_raw['html'];
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$banneradmiddle = $phpAds_raw['html'];
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$banneradbottom = $phpAds_raw['html'];
Which would set 3 separate banner ad variables.
As you might guess, the javascript invocation is easier.. hehe