forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: antisa33 on September 23, 2005, 04:46:06 am

Title: A page with the theme
Post by: antisa33 on September 23, 2005, 04:46:06 am
hello !
i use this code to make a page with my coppermine theme and menu but when i put it in a directory it wont work, i have tried with ../ :
require('../include/init.inc.php');
But it dont work too, how can i do that ?
for example this page is here /test/index.php
thanks a lot !

<?php

define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('titre !');


?>       
html code
 <?php

pagefooter();
?>
Title: Re: A page with the theme
Post by: artistsinhawaii on September 23, 2005, 04:56:34 am
Antisa,

try this link:  http://forum.coppermine-gallery.net/index.php?topic=21000.0

Dennis
Title: Re: A page with the theme
Post by: antisa33 on September 23, 2005, 05:06:12 am
Thanks but it is not good for me because he said
Code: [Select]
They will have to reside inside the coppermine folder, or the subsequent includes will fail to work. HTH
And me i put my file into a sub directory  ??? How can i do ?
Title: Re: A page with the theme
Post by: artistsinhawaii on September 23, 2005, 06:33:52 am
I'm not sure that can be done.

But why do you need that page to be in a subfolder?  Why not simply have it point to the files you need in the subfolder, but keep it in the coppermine folder?

Dennis
Title: Re: A page with the theme
Post by: Tranz on September 23, 2005, 07:13:05 am
hmmm.... try using the absolute path, like /home/username/public_html...etc as an example.
Title: Re: A page with the theme
Post by: antisa33 on September 23, 2005, 12:44:22 pm
Quote
hmmm.... try using the absolute path, like /home/username/public_html...etc as an example.
It doesn't work !!!
Title: Re: A page with the theme
Post by: Nibbler on September 23, 2005, 03:26:28 pm
You'd need to chdir to your coppermine directory before you include if you use this method

Code: [Select]
chdir('..');
define('IN_COPPERMINE', true);
require('include/init.inc.php');

Then you may also need to add an html base tag into your head to correct any path discrepancy .