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.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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