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: Can not input php code in the template.index file  (Read 3141 times)

0 Members and 1 Guest are viewing this topic.

hilophilo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Can not input php code in the template.index file
« on: November 23, 2003, 12:28:42 am »

how would add php code to the template.index file in /themes/hardwired/template.html.

i tried renaming template.html to template.php and also changed the line define('TEMPLATE_FILE', 'template.php'); in the include/init.inc.php file. It shows the photoalbum fine but i cant add php code to it.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Can not input php code in the template.index file
« Reply #1 on: November 23, 2003, 02:30:10 am »

now this has been asked very often...
The answer is: you can't! You can't simply rename the file extension from html to php, as the file isn't actually run in the browser, but it's content is being parsed (meaning it's content is being read and the bracket stuff is being replaced with the coppermine gallery output). Do some search on the board and faq, and read the doc and manual. You can have php code in theme.php and you can use anycontent.php to add some custom dynamical php content.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.