Themes: Smarty 3.1 is coming to next version of XOOPS

Posted by: Mambaon 2015/1/14 1:50:00 6668 reads
Resized Image

2015 is starting very well for XOOPS!

Thanks to our Core Team Leader, Richard (aka Geekwright), we will have finally Smarty 3.x in the next version of XOOPS!

Thank you Richard for your hard work on this!

From there: Quote:
This implement the latest Smarty 3.1 version in XOOPS. For an overview of the new Smarty see: This introduces a number of BC breaks from Smarty version2.x. You may want to refer to the following documents: ... ter/SMARTY_2_BC_NOTES.txt ... r/SMARTY_3.0_BC_NOTES.txt ... ster/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}>