PDA

View Full Version : Cannot add banner code


ChristianA
09-30-2004, 06:37 PM
Trying to add the following banner code:

<?php
if (@include('/usr/local/www/data-dist/zoopet/banners/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>

...to the header section. I get the following problem:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/www/data-dist/zoopet/forum/includes/adminfunctions_template.php(3055) : eval()'d code on line 19

Zachery
09-30-2004, 06:46 PM
Trying to add the following banner code:

<?php
if (@include('/usr/local/www/data-dist/zoopet/banners/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>

...to the header section. I get the following problem:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/www/data-dist/zoopet/forum/includes/adminfunctions_template.php(3055) : eval()'d code on line 19
1. php cant be put into regular templates
2. you are already in a php file, theres no need for <?php ?>
3. place that code into the phpinclude_start template, minus the <?php and ?> and it should be ok.