Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Security settings → PHP_TAGS (ref: https://www.smarty.net/docsv2/en/variable.security.settings.tpl )
    To enable use of Smarty {php} tags, add following to bottom of includes/config.php file:

    Wiki Markupcode
    languagephp
    $config['Smarty.PHP_TAGS']=true;



  2. Trusted directories - to be used with {include_php} tag - (ref: https://www.smarty.net/docsv2/en/variable.trusted.dir.tpl )
    To provide array containing list of trusted directories, add  to bottom includes/config.php file:

    unmigrated-wiki-markup



    Code Block
    languagephp
    $config['Smarty.trusted_dir']=[
     '/path/to/first/trusted/directory/',
     '/path/to/another/trusted/directory/'
    ];


  3. PHP handling - how Smarty should react php code (within <?php ?> tags) - (ref: https://www.smarty.net/docsv2/en/variable.php.handling.tpl )
    Set value below in includes/config.php:

    unmigrated-wiki-markup



    Code Block
    languagephp
    $config['Smarty.php_handling']=3;


    Following values are available:

    • 0Smarty echos tags as-is (default)

    • 1Smarty quotes the tags as html entities
    • 2Smarty removes the tags from the templates
    • 3Smarty will execute the tags as PHP code

...