Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: call cpg meta on non cpg pages  (Read 2609 times)

0 Members and 1 Guest are viewing this topic.

TheSystemSucks

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
call cpg meta on non cpg pages
« 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
Code: [Select]
require('include/init.inc.php');to
Code: [Select]
require('../galleries/include/init.inc.php')and then add then add it all to the 'root/' page?
Code: [Select]
<?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..
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: call cpg meta on non cpg pages
« Reply #1 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 15 queries.