coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: TheSystemSucks on April 02, 2007, 04:01:35 AM

Title: call cpg meta on non cpg pages
Post by: TheSystemSucks on April 02, 2007, 04:01:35 AM
Hi, I am trying to add the cpg meta login form to a php file in my 'root/'  but My cpg install is at 'root/galleries/'
I thought this thread http://forum.coppermine-gallery.net/index.php?topic=42712.0 on making a new cpg page
may help by showing what require(?) tags (or others?) I need to have and modify..

Sammi said his from scratch cpg page would be at the gallery root ('root/galleries')
perhaps I mod require('include/init.inc.php');to require('../galleries/include/init.inc.php')
and then add then add it all to the 'root/' page?
<?php
define
('IN_COPPERMINE'true);
require(
'../galleries/include/init.inc.php');
pageheader("simple page");
?>


add the login form meta here..

<?php
pagefooter
();
ob_end_flush();
?>

like that? but it doesn't work, just blank page..
Title: Re: call cpg meta on non cpg pages
Post by: Joachim Müller on April 02, 2007, 08:09:18 AM
Custom pages using Coppermine's header and footer can only reside within the folder coppermine is installed in. Subsequently, the method you propose (using a nested path to the include file) will not work. The reason is that the triggered include file will itself include some more files, expecting them within a relative path from the folder the page is in.
Just create your custom page within the coppermine folder and everything should be fine.