In default, file main.tpl is a template file of DLE. But you want to insert PHP code in this file for some purpose.
Insert PHP Codes In Main.tpl
Insert PHP Codes In Main.tpl
Use of any PHP inserts in templates. So often a need to paste on your website PHP script third party. However, by default, this feature is disabled in the script. Therefore we offer you a little h@ck that allows to use any PHP code in templates
1. Open file index.php
Find
echo $tpl->result['main'];
Replace to
eval (' ?' . '>' . $tpl->result['main'] . '<' . '?php ');
2. That all!

Updates
Dle templates English


