How to use php in your template? + errors in the docs How to use php in your template? + errors in the docs
 

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

How to use php in your template? + errors in the docs

Started by MaThIbUs, January 17, 2004, 03:09:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MaThIbUs

Well, the title says it all...

I tried renaming template.html to template.php and then change the variable in includes/init.inc.php, but it just doesn't seem to work :(

btw, there are some small errors in the documentation:
QuoteTo create a new template the best solution is to use an existing one as a basis. Do do that make a copy of the folder of the theme you want to use as a basis then edit the "template.html" and "template.php" files and replace all occurences of "themes/old_theme_dir" with "themes/new_theme_dir" in order for the links to point to the correct place.
It should say:
QuoteTo create a new template, the best solution is to use an existing one as a basis. To do that, make a copy of the folder of the theme you want to use as a basis. Then edit the "template.html" and "theme.php" files and replace all occurences of "themes/old_theme_dir" with "themes/new_theme_dir" in order for the links to point to the correct place.

Joachim Müller

you simply can't use php in the templates (see faq: custom header).
Thanks for pointing out the typos, I updated the dev version of the readme accordingly.

GauGau

MaThIbUs

Thanks for the reply. I'll try editing theme.php then.

I thought it might've been possible using a hack, as there's a mod for this for phpBB... More info about that here.

/m_aTh!bUs