forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: accepto on May 19, 2006, 04:43:38 pm

Title: problem with include
Post by: accepto on May 19, 2006, 04:43:38 pm
Hallo,

I have a problem with calling the index.php . I want to call in my own index.php  the cpg index.php with this command:
include("./tangafun/index.php");
tangafun is the subdir, where I installed cpg. It is working fine, when I access it directly or with an iframe.

I read the "path"  discussions and managed to avoid the "fatal errors", but it is still not working.
With this:
$test= ini_set('include_path',ini_get('include_path').';:./usr/share/php'.';:./usr/include/'.';:./usr/share/'.';:./tangafun/include/'.';:./tangafun/'); 
$test=ini_get('include_path');
//echo $test;
include("./tangafun/index.php");

I get now this error:
Coppermine Photo Gallery seems not to be installed correctly, or you are running coppermine for the first time. You'll be redirected to the installer. If your browser doesn't support redirect, click here.

I have no idea what to try next - any ideas??

Thank you all very much in advance and greetings from Spain
Claudia
Title: Re: problem with include
Post by: Nibbler on May 19, 2006, 04:53:36 pm
You can't include() Coppermine, it's not designed for that.
Title: Re: problem with include
Post by: Joachim Müller on May 19, 2006, 04:55:22 pm
coppermine simply can't be integrated into an existing web page using PHP include/require commands - that's not the way it works. Do as suggested in the docs and create a theme that matches your site's layout, or use the iframe method, or use the custom_header/footer includes built into coppermine to include your surrounding stuff/navigation. Your choice.

@Nibbler: you beat me to it  ;)
Title: Re: problem with include
Post by: accepto on May 19, 2006, 04:59:56 pm
Oh well, that explains everything ;D. Thank you for the very fast answers! I should have asked sooner.
So I will work on the theme files this weekend...

Claudia