The insert and execute arbitrary code can be accomplished by creating your own template tag.
To do this in the folder themes/functions add another file. For example, show_my_code.php.
Example:
<?php
if (! defined('DIAFAN'))
{
$path = __FILE__; $i = 0;
while(! file_exists($path.'/includes/404.php'))
{
if($i == 10) exit; $i++;
$path = dirname($path);
}
include $path.'/includes/404.php';
}
echo 'DIAFAN.CMS';
To code within a method has executed, deduce template tag in a single file from the folder themes. As a rule, it is site.php:
<insert name="show_my_code">
Now the code file show_my_code.php will connect each time the template pages of the site is a file site.php. In our case, it will be shown "DIAFAN.CMS".
The tag can also be inserted in the visual editor, for this you need to select the button "Edit HTML-code" (the first visual editor button).
Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor #1 include_once() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499] #2 Docs_model->prepare_text( The insert and execute arbitrary code can be accomplished by creating your own template tag. To do this in the folder *themes/functions* add another file. For example, *show_my_code.php*. ---exampl...) called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:94] #3 Docs_model->show() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.php:29] #4 Docs->init() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:474] #5 Init->module() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:119] #6 Init->start() called at [/var/www/diafan/data/www/diafancms.com/index.php:62] | /var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499 |