📄 release_notes
字号:
2.5.0-----Very minor adjustments since RC2, see the NEWS file for details.2.5.0-RC2---------Many fixes since the RC1 release. This one is as close to production quality asthey come, so this will be the last release before 2.5.0. The SGML documentationfiles have also been removed from the tarball. If you want them, get them fromthe CVS repository.2.5.0-RC1---------Release Candidate 1. All $smarty vars can now be dynamic, such as$smarty.get.$foo. A new class function get_function_object() gets you areference to an assigned object, useful within your own custom functions.append() can now merge as well as append with a third optional attribute. A newclass function get_config_vars() was added, and get_template_vars() can now beused to get individual vars. Full variable syntax is now supported withindouble quotes via a backtick (`) syntax. Files created by smarty are nowwritten to a tmp file then renamed to avoid file lock retention. html_radios,html_checkboxes, html_table, html_image, nl2br functions added, see the NEWSfile for full details.2.4.2-----Another point release. Added support for dynamic object reference syntax($foo->$bar), support for full variable syntax within quotes ("$foo[0].bar"),and other minor fixes. See the NEWS file for full details.2.4.1-----This is basically a point release, cleaning up a few things caughtin the 2.4.0 release. See the NEWS file for full details.2.4.0-----Smarty now supports the ability to access objects within the templates. Twomethods are available, one which closely follows Smartys conventions, andanother that follows more traditional object syntax for those familiar withPHP.The internal compiling engine has also undergone some major work. The regexparsing was rewritten to be much more strict, more secure and moremaintainable. Config files are now compiled, which can speed up pages quite abit that use config files extensively. Assigned variables are no longerextracted to PHP namespace, saving an extract call for every template. There isnow support for applying modifiers to static values and functions. You can nowaccess constants with $smarty.const.VAR. See the NEWS file for completechanges. 2.3.1-----The mtime on compiled files will now match the source files, in the case wherethe source file may not get the current timestamp, recompiling will still workas expected. Proper support for open_basedir has been added, so Smarty shouldwork correctly in safe mode. Added a few new features such as textformat blockfunction, strip variable modifier and optgroup support for html_options. Alsoother minor bug fixes, see the Change Log.2.3.0-----Smarty now has a {debug} template function that brings up the debugging consoleright where {debug} is called, regardless of $debugging settings. This works alittle different than turning on $debugging in the sense that it shows all thetemplate variables available at the time {debug} is called, including localscope vars. It does not show the templates names however, since thisexecuted during runtime of the template.You can now supply an expire time when clearing cache or compile files. This ismostly useful for removing stale files via the API.Plugins now stop execution upon error, instead of outputting a warning andcontinuing.Two new API functions, assign_by_ref() and append_by_ref() were added. Theyallow assigning template variables by reference. This can make a significantperformance gain, especially if you are assigning large arrays of data. PHP 5.0will do this implicitly, so these functions are basically workarounds.Several misc bug fixes, see the Change Log for information.2.2.0-----Smarty now allows an array of paths for the $plugin_dir class variable. Thedirectories will be searched in the order they are given, so for efficiency keepthe most-used plugins at the top. Also, absolute paths to the plugin directories aremore efficient than relying on the PHP include_path.Cache files can now be grouped with the cache_id. See the documentation underthe new "Caching" section for details. compile_id also respects the samegrouping syntax. The cache/compile file structure changed, so be sure to clearout all your cache and compile files when upgrading Smarty. Also if you areusing PHP-accelerator, restart apache. I've seen some quirky things happen ifthe phpa files do not get cleared (known issue with phpa and parentclass-member changes, so just clear 'em.)Smarty now correctly respects the PHP include_path for $template_dir, $compile_dir,$cache_dir, $config_dir and $plugin_dir. Be aware that relying on theinclude_path is an overhead, try to use absolute pathnames when possible(or relative to working directory.)Documentation has been updated and rearranged a bit. Most notably, theinstallation instructions are completely revamped, and a new Caching sectionexplains Smarty's caching in detail along with the new grouping functionality.Many misc. bug fixes and enhancements, see the full ChangeLog (NEWS file) fordetails.2.1.1-----There was a bug with template paths and the include_path, this has been fixed.Also register_outputfilter() did not work, this is fixed. A new templatefunction named "cycle" has been added to the distribution, nice for cyclingthrough a list (or array) of values.2.1.0-----This release has quite a few new features and fixes. Most notable are theintroduction of block functions, so you can write plugins that work on a blockof text with {func}{/func} notation. Also output filters were added, so you canapply a function against the output of your templates. This differs from the postfilter function, which works on the compiled template at compile time, andoutput filters work on the template output at runtime.Many other features and bug fixes are noted in the NEWS file.2.0.1-----This is a point release, fixing a few bugs and cleaning things up. A pluginwas renamed, the dash "-" was removed from compiled template and cached filenames. If you're upgrading, you might want to clear them out first. See theChangeLog for details.2.0.0-----This release is a huge milestone for Smarty. Most notable new things are aplugin architecture, removal of PEAR dependency, and optimizations thatdrastically improve the performance of Smarty in most cases.The plugin architecture allows modifiers, custom functions, compiler functions,prefilters, postfilters, resources, and insert functions to be added bysimply dropping a file into the plugins directory. Once dropped in, they areautomatically registered by the template engine. This makes user-contributedplugins easy to manage, as well as the internal workings of Smarty easy tocontrol and customize. This new architecture depends on the __FILE__ constant,which contains the full path to the executing script. Some older versions ofPHP incorrectly gave the script name and not the full filesystem path. Be sureyour version of PHP populates __FILE__ correctly. If you use custom templateresource functions, the format of these changed with the plugin architecture.Be sure to update your functions accordingly. See the template resource sectionof the documentation.The PEAR dependancy was removed from Smarty. The Config_File class that comeswith Smarty was actually what needed PEAR for error handling which Smarty didn'tuse, but now everything is self-contained.Performance improvements are graphed on the benchmark page, you will see thatoverall performance has been sped up by as much as 80% in some cases.Smarty-cached pages now support If-Modified-Since headers, meaning that if acached template page has not changed since the last request, a "304 NotModified" header will be sent instead of resending the same page. This isdisabled by default, change the setting of $cache_modified_check.1.5.2-----Mostly bug fixes, added a default template resource handler.1.5.1-----Critical bug fix release. If you use caching, you'll need to upgrade.1.5.0-----Several feature enhancements were made to this version, most notably the{foreach ...} command which is an alternative to {section ...} with an easiersyntax for looping through a single array of values. Several functions wereenhanced so that the output can be automatically assigned to a templatevariable instead of displayed (assign attribute). Cache files can now becontrolled with a custom function as an alternative to the built-in file basedmethod. Many code cleanups and bug fixed went into this release as well.1.4.6-----The behavior with caching and compile_check has been slightly enhanced. Ifcaching is enabled AND compile_check is enabled, the cache will immediately getregenerated if _any_ involved template or config file is updated. This imposesa slight performance hit because it must check all the files for changes, so besure to run live sites with caching enabled and compile_check disabled for best
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -