W
W
Way2015-02-02 20:41:45
PHP
Way, 2015-02-02 20:41:45

[dle 10.4]How to embed a php script into a site template (login.tpl, etc.)?

How, on the new version of dle 10.4, can you embed a php script in the template files (login.tpl, etc.).
Previously, it was possible to remove echo "$tpl->result['main'];" in index.php and replace it with "eval (' ?' . '>' . $tpl->result['main'] . '<' . '?php ');" and it was easy to write a php script. But now such focus does not roll.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Way, 2015-02-05
@YouTy6bl4

Everything was moved to engine/modules/main.tpl - change as before:
Instead of $tpl->result['main']; set: eval (' ?' . '>' . $tpl->result['main'] . '<' . '?php ');
And that's it. Generally told where $tpl->result['main'] changes; .

M
Maxim Kudryavtsev, 2015-02-02
@kumaxim

1.Create the ty6bl4.php file in the /engine/modules/ folder 2.Write
the required php code in this file
3.Include it in login.tpl like this {include file="/engine/modules/file ty6bl4.php"}
Read the manual, section "Developers"
www.dle-news.ru/extras/online/index.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question