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: Turn template into a php file  (Read 2967 times)

0 Members and 1 Guest are viewing this topic.

blowfishdl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 57
Turn template into a php file
« on: January 29, 2008, 05:41:03 pm »

Anyway to use template.php instead of template.html?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Turn template into a php file
« Reply #1 on: January 29, 2008, 05:42:16 pm »

No. Read the docs? Searched the board? Obviously not.
Logged

zoinks

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
    • Zoinks! Graphics
Re: Turn template into a php file
« Reply #2 on: April 19, 2008, 10:49:34 pm »

I understand that this question has been asked a million times, and the answer is always an emphatic "no!" But here's a followup question... Why not? If so many people (myself included) would benefit from the template.html file being template.php, why has this not been implemented in any of the updates over the years? To just say "that's the way it is in the core" -- as I've seen many times on this board -- doesn't really answer the question. Obviously the core can be revised, it happens all the time!

And having a template.php isn't just a one-off benefit -- Having to "hack" the include/themes.inc.php file to include additional php makes security updates/upgrades all the more difficult.

If one of the developers can address this I'd really appreciate it.  ???
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Turn template into a php file
« Reply #3 on: April 20, 2008, 02:27:16 am »

I understand that this question has been asked a million times, and the answer is always an emphatic "no!"
There will be no beaftures from cpg1.4.x to cpg1.4.y.

why has this not been implemented in any of the updates over the years? To just say "that's the way it is in the core" -- as I've seen many times on this board -- doesn't really answer the question.
The question "why has coppermine been coded in the way it is" simply doesn't apply.

Obviously the core can be revised, it happens all the time!
Only happnes for bugfixes, but not for additional features. PHP-driven templates would be an additional feature. Doesn't make sense anyway, since you can accomplish anything without PHP being parsed in template.html.

Having to "hack" the include/themes.inc.php file to include additional php makes security updates/upgrades all the more difficult.
You're not supposed to edit that file - under no circumstances. Instead, you should edit themes/yourtheme/theme.php instead. This will help you when updadting as well. You have done something wrong (editing themes.inc.php instead of theme.php), so your question is invalid in the first place. RTFM!
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 16 queries.