Can not input php code in the template.index file Can not input php code in the template.index file
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Can not input php code in the template.index file

Started by hilophilo, November 23, 2003, 12:28:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hilophilo

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.

Joachim Müller

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