Quote:
Originally Posted by KirbyDE
@thephonemall
PHP Code:
if (@include(getenv('DOCUMENT_ROOT').'http://www.thephonemall.net/ad/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, 'www.google.com', 'www.thephonemall.net/ads/bigad.swf', '0', $phpAds_context);
}
Put this in phpinclude_start (this is basically the code you posted, I just removed <?php ?> and the echo statement) and use $phpAds_raw[html] in template header where you want to have the banner.
|
I am trying to do about the same thing but I want several advertisements on the page in different locations which are setup as zones. So I am trying to figure out how to use that invocation code style but in different spots.
So I have figured out $phpAds_raw calls the above link code but because we run several forums and run different advertisers in each I need to set conditions.
PHP Code:
if ($foruminfo['forumid']=='9')
{
$advertiser2 = 'if (@include('path/to/script/adscript/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:9', 0, '_blank', '', '0', $phpAds_context);
}'
}
else
{
if ($foruminfo['forumid']=='8')
{
$advertiser2 = 'if (@include('path/to/script/adscript/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:8', 0, '_blank', '', '0', $phpAds_context);
}' }
else
{ $advertiser2 = >'didnt work'
well it sure didnt work....
I have a feeling it is due to my lack of skills in coding and I have something wrong here. At least it seems I have seen conditions set for varibles before? I had the above in the phpinclude_start
help help its beating me up