coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: epsilon on February 07, 2004, 02:17:56 PM

Title: Include function php in template.html/php?
Post by: epsilon on February 07, 2004, 02:17:56 PM
Include function only works in .php extension files, ok but if i rename template.html to .php the gallery dont understand it.

What code i must change to run template.html as template.php?

Thankyou
Title: Include function php in template.html/php?
Post by: hmmwv on February 07, 2004, 02:27:01 PM
i think it´s in include\init.inc

not sure so....
Title: Include function php in template.html/php?
Post by: Pathos on February 07, 2004, 04:02:06 PM
line 113 of include/init.inc.php is where TEMPLATE_FILE is defined.

change:
define('TEMPLATE_FILE', 'template.html');

to:
define('TEMPLATE_FILE', 'template.php');
Title: Yes it runs but...
Post by: epsilon on February 07, 2004, 07:25:13 PM
I changed it and coppermine reads from template.php ok
But when it loads in the web dont run the include, very strange, if i put the complete url to template.php it runs the include well.
Title: Include function php in template.html/php?
Post by: Pathos on February 07, 2004, 07:45:23 PM
You usally need to put at least the relavtive path to your includes in your script.

wouldn't theme.php be a better place todo the what ever it is your trying todo?
Title: Include function php in template.html/php?
Post by: Joachim Müller on February 08, 2004, 11:36:51 AM
You can't insert php code into template.html, no matter what you rename it to.
PHP code has to go into theme.php!

Read the faq!

GauGau
Title: Include function php in template.html/php?
Post by: epsilon on February 08, 2004, 11:12:03 PM
I want Split my templete.html in 2 parts, first one file header.php (the header that will be included in template.html/php) Do you know how can i do it?
Title: Include function php in template.html/php?
Post by: Joachim Müller on February 09, 2004, 08:01:05 AM
you can not have php in template.html !!!!
Read http://coppermine.sourceforge.net/faq.php?q=customHeader#customHeader for custom headers...

GauGau