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: Include function php in template.html/php?  (Read 3340 times)

0 Members and 1 Guest are viewing this topic.

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Include function php in template.html/php?
« 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
Logged

hmmwv

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Include function php in template.html/php?
« Reply #1 on: February 07, 2004, 02:27:01 pm »

i think it´s in include\init.inc

not sure so....
Logged

Pathos

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Include function php in template.html/php?
« Reply #2 on: February 07, 2004, 04:02:06 pm »

line 113 of include/init.inc.php is where TEMPLATE_FILE is defined.

change:
Code: [Select]
define('TEMPLATE_FILE', 'template.html');

to:
Code: [Select]
define('TEMPLATE_FILE', 'template.php');
Logged

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Yes it runs but...
« Reply #3 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.
Logged

Pathos

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Include function php in template.html/php?
« Reply #4 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Include function php in template.html/php?
« Reply #5 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
Logged

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Include function php in template.html/php?
« Reply #6 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Include function php in template.html/php?
« Reply #7 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
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 14 queries.