2015/1/14 2:07
Mamba
Moderator
Posts: 11409
Since: 2004/4/23
This implement the latest Smarty 3.1 version in XOOPS. For an overview of the new Smarty see: http://www.smarty.net/v3_overview This introduces a number of BC breaks from Smarty version2.x. You may want to refer to the following documents: https://github.com/smarty-php/smarty/blob/master/SMARTY_2_BC_NOTES.txt https://github.com/smarty-php/smarty/blob/master/SMARTY_3.0_BC_NOTES.txt https://github.com/smarty-php/smarty/blob/master/SMARTY_3.1_NOTES.txt Quick over view of some practical template changes: String arguments need to be quoted. For example the tag <{xoAppUrl images/aligncenter.gif}> becomes <{xoAppUrl 'images/aligncenter.gif'}> Variables used in templates that have not been assigned will generate errors. You can fix this with the default modifier, i.e. <{$error_msg}> becomes <{$error_msg|default:''}> <{php}> is no longer supported. One common use for this was generating XOOPS security tokens. This use case now has a custom tag, <{securityToken}> <{foreachq}> and <{includeq}> depended heavily on Smarty 2 compiler internals and have been removed. Speed gains from recent PHP versions and from Smarty 3.1 make them much less useful. Use <{foreach}> and <{include}> respectively to replace them. You can use a variable scope modifier on <{include}> in the rare circumstance that changes to variable scope cause issues. Smarty has a <{block}> tag now that is used for template inheritance. To prevent conflict the exiting custom function has been renamed to <{xoblock}>
2015/5/19 0:01
xoobaru
Just can't stay away
Posts: 494
Since: 2010/12/2
<{php}> is no longer supported.
Advanced Search
303 user(s) are online (63 user(s) are browsing Support Forums)
Members: 0
Guests: 303