Announcement

Collapse
No announcement yet.

Getting error with PHP Ads New

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting error with PHP Ads New

    Hello

    I am using PHP Ads New to display banners in my forum:

    http://www.infoprofitstalk.com

    I'm currently using an HTML call for the banners and that works fine. Here's the code:

    <a href='http://www.infoprofitstalk.com/banners/adclick.php?n=ade734ea' target='_blank'><img src='http://www.infoprofitstalk.com/banners/adview.php?what=zone:2&amp;n=ade734ea' border='0' alt=''>

    All I did was include that within the forum style template.

    However, using an HTML call does have some limitations.

    So I'm looking to move to a 'local call', which basically uses PHP. Here's the code:

    <?php
    if (@include(getenv('DOCUMENT_ROOT').'/banners/phpadsnew.inc.php')) {
    if (!isset($phpAds_context)) $phpAds_context = array();
    $phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
    $phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw['bannerid']);
    $phpAds_context[] = array('!=' => 'campaignid:'.$phpAds_raw['campaignid']);
    echo $phpAds_raw['html'];
    }
    ?>

    That works absolutely fine in a page by itself, but then when I use that same code in the forum template, I always get this error:

    Parse error: parse error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /usr/www/users/allportp/infoprofitstalk.com/global.php(317) : eval()'d code on line 42

    Can you help please?

    Many thanks.

    Sincerely,
    Louis

  • #2
    Please post this thread over at vBulletin.org. vBulletin.com doesnt offer support on hacking.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X