forum.coppermine-gallery.net

Support => Older/other versions => cpg1.1.X Support (standalone) => Topic started by: CBR on January 29, 2004, 04:14:47 pm

Title: phpAds VS Gallery
Post by: CBR on January 29, 2004, 04:14:47 pm
Quote
<?php

    if (@include(getenv('DOCUMENT_ROOT').'/phpAds/phpadsnew.inc.php')) {

        if (!isset($phpAds_context)) $phpAds_context = array();

        $phpAds_raw = view_raw ('', 1, '', '', '0', $phpAds_context);

        echo $phpAds_raw['html'];

    }

?>

PhpAds generated this code. And it is working in every ***.php or ***.html document. But in some reason it can not work if I add this code into theme.php
Could somebody explain the problem?
Title: phpAds VS Gallery
Post by: jdbaranger on January 29, 2004, 06:12:50 pm
Hi,

Try adding this code in template.html rather than in theme.php.

Jean-Denis
Title: phpAds VS Gallery
Post by: hyperion on January 29, 2004, 06:28:41 pm
Actually, theme.php should be fine if you made the necessary adjustments. I suspect the path may be incorrect.  

Change:

 
Code: [Select]
if (@include(getenv('DOCUMENT_ROOT').'/phpAds/phpadsnew.inc.php'))

to:

 
Code: [Select]
if (@include('actual full file path'))

and see if that helps.