Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic.

Related tags

Templating php smarty
Overview

Smarty 3 template engine

smarty.net

Build Status

Documentation

For documentation see www.smarty.net/docs/en/

Requirements

Smarty can be run with PHP 5.2 to PHP 7.4.

Distribution repository

Smarty 3.1.28 introduces run time template inheritance

Read the NEW_FEATURES and INHERITANCE_RELEASE_NOTES file for recent extensions to Smarty 3.1 functionality

Smarty versions 3.1.11 or later are now on github and can be installed with Composer.

The "smarty/smarty" package will start at libs/.... subfolder.

To get the latest stable version of Smarty 3.1 use:

"require": {
    "smarty/smarty": "~3.1"
}

in your composer.json file.

To get the trunk version use:

"require": {
    "smarty/smarty": "[email protected]"
}

For a specific version use something like:

"require": {
    "smarty/smarty": "3.1.19"
}

PHPUnit test can be installed by corresponding composer entries like:

"require": {
    "smarty/smarty-phpunit": "3.1.19"
}

Similar applies for the lexer/parser generator.

"require": {
    "smarty/smarty-lexer": "3.1.19"
}

Or you could use:

"require": {
    "smarty/smarty-dev": "3.1.19"
}

Which is a wrapper to install all 3 packages.

Composer can also be used for Smarty2 versions 2.6.24 to 2.6.30.

Comments
  • Fixed PHP 8 modifier

    Fixed PHP 8 modifier "default"

    PHP 8 has deprecated for "@". But modifier "default" is not compatible.

    plugins/modifiercompiler.default.php // $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)'; $output = '(($tmp = ' . $output . ' ?? null)===null||$tmp===\'\' ? ' . $param . ' : $tmp)'; // edit by 2020.12.1 -- fixed PHP 8

    opened by juvenrui 46
  • Smarty is dead? alternative engine to migrate to

    Smarty is dead? alternative engine to migrate to

    I see that Smarty hasn't had any updates in 2019, is it dead?

    If yes, then maybe someone could post an alternative php templating engine, so we can start migrating.

    Thank you.

    opened by ghost 35
  • Regression in 3.1.28 - extendsall resource type before template file name doesn't work

    Regression in 3.1.28 - extendsall resource type before template file name doesn't work

    When we use

    {include file="extendsall:template.html"}
    

    in our template, extendsall is not supported at all in 3.1.28. File which defines extendsall resource type is original resource.extendsall.php file from tgz package (demos/plugins/resource_extendsall.php) and is placed in /path/to/application/plugins directory added to plugin dirs by the following code:

    $smarty->addPluginsDir('/path/to/application/plugins');
    

    In 3.1.27 workaround with prefilter replacing {include file="template.html"} by {include file="extendsall:template.html"} was a solution.

    opened by chilek 34
  • [Discussion] Raising minimal supported PHP version

    [Discussion] Raising minimal supported PHP version

    This is not the first time such question is raised, but until now it was more in the spirit of "if we raise Smarty, version, then…".

    Now, I'd like to raise the reverse question. Should we actually KEEP supporting PHP5(for now), and for the future, which PHP versions we're supporting and how do we deal with version upgrades?

    Personal opinion following

    As I see it right now, this is no longer a question of "which of PHP5 versions we support?" We can't keep support for 5.6 if we plan to have consistent error handling.

    Here's a list of features I see relevant for Smarty as a project:

    For 7.0:

    For 7.1:

    For 7.4:

    There's a few things in 7.2 and 7.3 that can be considered QoL at best, but nothing I can call a major improvements or life-changer.

    Given an increasing pressure from supporting disparate syntactic constructs between different PHP versions, the list of relevant features and consulting the list of supported PHP versions, I think it would be reasonable to leave Smarty 3.1 targeting PHP=^5.3.6 || ^7.0 (which would be a version bump from current 5.2, but will still probably work with 5.1+) and start a new Smarty version branch (3.2?) targeting PHP=^7.1 || ^8.0 with maintained backward compatibility on template level.

    The choice of version 5.3.6 is made because PHP up to this specific version received fixes to several facilities that I see important for consistent coding practices.

    In addition, I think it may be worthwhile to start deprecation process for legacy Smarty2 constructs while we're still in compatibility mode.

    opened by AnrDaemon 25
  • "extends"'s inheritance chain of templates with the same name

    Hello,

    I assume the following scenario: I have many template directories, when each contains template.html file. Let's assume these directories have names: directory1, directory2, directory3. Then we add all these directories using Smarty::addTemplateDir() method in exact above order to template directories list. I'd like to be able to create templates as below:

    1. template.html from directory3: {block name="contents"}This is {/block}
    2. template.html from directory2: {extends file="template.html"} {block name="contents"}{$smarty.block.parent}the {/block}
    3. template.html from directory1: {extends file="template.html"} {block name="contents"}{$smarty.block.parent}test.{/block}

    I'd like to get as the result the following text: This is the test.

    Now Smarty triggers error in such scenario, because of recursive template loading. It could detect that a given directory has been used as template directory for template.html file already and continue searching for template.html file from next template directory in directory chain. It would allow to create dynamically modified templates with simple usage from php code: $smarty->display('template.html'); This code could be used by something like application plugins.

    Maybe you have another solution for described scenario?

    Bests, Tomasz

    opened by chilek 24
  • Add PHP 8.1 compatibility

    Add PHP 8.1 compatibility

    The goal of this PR is to make smarty compatible with PHP 8.1.

    The main issue was the use of the function strftime() which is deprecated in PHP 8.1. This problem is solve by the use of IntlDateFormatter after being sure that the intl extension is loaded.

    Other deprecations have been removed too.

    waiting 
    opened by atomiix 22
  • strftime deprecated in PHP 8.1

    strftime deprecated in PHP 8.1

    Unknown: Function strftime() is deprecated in file /Smarty_Compiler.class.php line 395
    Unknown: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in file /Smarty_Compiler.class.php line 1531
    
    waiting 
    opened by mambax7 21
  • Smarty is not compatible with PHP 8.0

    Smarty is not compatible with PHP 8.0

    https://github.com/php/php-src/blob/php-8.0.0beta1/UPGRADING

    For example, this patch causes a fatal error

    diff --git a/demo/templates/index.tpl b/demo/templates/index.tpl
    index 1fbb6d3..291c3fa 100644
    --- a/demo/templates/index.tpl
    +++ b/demo/templates/index.tpl
    @@ -1,6 +1,10 @@
     {config_load file="test.conf" section="setup"}
     {include file="header.tpl" title=foo}
     
    +
    +{if $smarty.const.TEST}
    +{$smarty.const.TEST}
    +{/if}
     <PRE>
     
     {* bold and title are read from the config file *}
    
    

    Fatal error: Uncaught Error: Undefined constant "TEST" in public_html/smarty/demo/templates_c/234d0264d74c0efb651cf2c28d8975810c02182d_0.file.index.tpl.cache.php:35

    Stack trace:
    #0 public_html/smarty/demo/templates_c/234d0264d74c0efb651cf2c28d8975810c02182d_0.file.index.tpl.cache.php(35): constant('TEST')
    #1 public_html/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5f32594c42fb41_62206325(Object(Smarty_Internal_Template))
    #2 public_html/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base-&gt;getRenderedTemplateCode(Object(Smarty_Internal_Template))
    #3 public_html/smarty/libs/sysplugins/smarty_internal_runtime_updatecache.php(38): Smarty_Template_Compiled-&gt;render(Object(Smarty_Internal_Template))
    #4 public_html/smarty/libs/sysplugins/smarty_template_cached.php(143): Smarty_Internal_Runtime_UpdateCache-&gt;updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), f#5 public_html/smarty/libs/sysplugins/smarty_internal_template.php(211): Smarty_Template_Cached-&gt;render(Object(Smarty_Internal_Template), false)
    #6 public_html/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template-&gt;render(false, 1)
    #7 public_html/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase-&gt;_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
    #8 public_html/smarty/demo/index.php(36): Smarty_Internal_TemplateBase-&gt;display('index.tpl')
    #9 {main}
    

    due to https://github.com/php/php-src/blob/php-8.0.0beta1/UPGRADING

    The code like this should not be used

    <?php if (@constant('TEST')) {
    echo @constant('TEST');?>
    
    <?php }?>
    
    opened by ildar-aim 19
  • Smarty 3.1.31 doesn't cache output filters if template contains {nocache}

    Smarty 3.1.31 doesn't cache output filters if template contains {nocache}

    I think there is a bug in smarty_internal_runtime_updatecache.php on

    if (!$no_output_filter && !$_template->compiled->has_nocache_code &&
                (isset($_template->smarty->autoload_filters['output']) ||
                    isset($_template->smarty->registered_filters['output']))
            ) {
                $content = $_template->smarty->ext->_filterHandler->runFilter('output', $content, $_template);
    }
    

    If the template contains {nocache} code, the results of the output filters are not going to be cached and that is IMHO useless because it leads to loss of the result of probably expensive output filters.

    It's fixed by removing the condition

    if (!$no_output_filter &&
                (isset($_template->smarty->autoload_filters['output']) ||
                    isset($_template->smarty->registered_filters['output']))
            ) {
                $content = $_template->smarty->ext->_filterHandler->runFilter('output', $content, $_template);
    }
    
    opened by mreiche 13
  • Smarty property 'sub_template' does not exist

    Smarty property 'sub_template' does not exist

    Hi,

    After upgrade from Smarty 3.1.27 to 3.1.29 i am receiving this error:

    Smarty property 'sub_template' does not exist

    It is throwred by the file smarty_internal_extension_handler.php at the line 92.

    Someone knows how can i solve this?

    Thanks!

    opened by masimao 13
  • Fatal error: Cannot unset string offsets in vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php on line 337

    Fatal error: Cannot unset string offsets in vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php on line 337

    smarty v.3.1.24

    Stack trace:

    10  87.0320 22877960    Smarty->fetch( string(17), null, null, null, bool, bool, bool ) .../ViewRenderer.php:84
    11  87.0320 22882448    Smarty_Internal_Template->render( bool, bool, bool )    .../Smarty.class.php:824
    12  87.0380 22909816    Smarty_Template_Compiled->render( object(Smarty_Internal_Template)[1804] )  .../smarty_internal_template.php:246
    13  87.0380 22910424    Smarty_Template_Compiled->process( object(Smarty_Internal_Template)[1804] ) .../smarty_template_compiled.php:199
    14  87.0380 22910768    Smarty_Template_Compiled->compileTemplateSource( object(Smarty_Internal_Template)[1804] )   .../smarty_template_compiled.php:152
    15  87.0415 22958584    Smarty_Internal_TemplateCompilerBase->compileTemplate( object(Smarty_Internal_Template)[1804], ???, ??? )   .../smarty_template_compiled.php:226
    16  87.0434 22966104    Smarty_Internal_SmartyTemplateCompiler->doCompile( string(4272), bool ) .../smarty_internal_templatecompilerbase.php:396
    17  87.0689 24537000    Smarty_Internal_Templateparser->doParse( long, string(1) )  .../smarty_internal_smartytemplatecompiler.php:114
    18  87.0689 24537584    Smarty_Internal_Templateparser->yy_reduce( long )   .../smarty_internal_templateparser.php:2398
    19  87.0689 24537792    Smarty_Internal_Templateparser->yy_r57( )   .../smarty_internal_templateparser.php:2303
    20  87.0689 24538008    Smarty_Internal_TemplateCompilerBase->compileTag( string(10), array(0), ??? )   .../smarty_internal_templateparser.php:1585
    21  87.0690 24538368    Smarty_Internal_TemplateCompilerBase->compileTag2( string(10), array(0), array(0) ) .../smarty_internal_templatecompilerbase.php:462
    22  87.0690 24538416    Smarty_Internal_TemplateCompilerBase->callTagCompiler( string(10), array(0), array(0), ???, ??? )   .../smarty_internal_templatecompilerbase.php:495
    23  87.0690 24541352    Smarty_Internal_Compile_Blockclose->compile( array(0), object(Smarty_Internal_SmartyTemplateCompiler)[1814], array(0), null, null ) .../smarty_internal_templatecompilerbase.php:761
    
    opened by Gamesh 13
  • Vscode: Use of unknown class: 'integer'

    Vscode: Use of unknown class: 'integer'

    In doc-comments like

       /**
         * saved cache lifetime in seconds
         *
         * @var integer
         */
        public $cache_lifetime = 0;
    
    

    vscode complains Use of unknown class: 'integer' I suppose it should be int instead.

    I currently have 257 errors in my project; I'd like to only have my own errors/warnings to worry about. ;-)

    opened by leifnel 0
  • Error handler should only allow notices etc in smarty templates, not beyond

    Error handler should only allow notices etc in smarty templates, not beyond

    If the error handler allow properties are true (default), Smarty catches ALL notices (in short) for ALL code that STARTS in a Smarty template. That's a bit too much. This notice should be caught like now:

    {{$nonExistingVar}}
    

    That throws an Undefined array key from 24555ff3ba201974a27652ea2c61a898c2df0cb8_0.file.bla.tpl and we want to catch that. That's good.

    But this one should NOT be caught by the Smarty error handler:

    {{$existingObject->existingMethod()}}
    
    function existingMethod() {
        return $this->existingArray['nonExistingKey'];
    }
    

    That also throws an Undefined array key, but NOT from compiled template code. But Smarty catches and suppresses it anyway. I don't think that's what we want.

    Can Smarty_Internal_ErrorHandler::handleError() check for the source of the error? If it's not a smarty compiled template file, let it through.

    opened by rudiedirkx 1
  • Deprecation notice should not be a fatal error

    Deprecation notice should not be a fatal error

    For some reason, I am receiving Fatal Errors like the following:

    Fatal error: Uncaught ErrorException: Using php-function "md5" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/patrick/github.com/getbooka/booka/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
    

    While I understand that and why this "feature" is deprecated, I don't understand why it has to be a fatal error. The wording is "will be removed in a future release," which means it is not removed now. So why is it throwing an error/exception? It should be a warning of some kind? Maybe I am doing something wrong that sets notices to fatal errors in my system, but I am not aware of this.

    Can you confirm that it's currently an exception with the wording above?

    PS: I know how to add my modifiers and work through this; the issue is about the error level of the deprecation notice, not the change itself.

    opened by davidsneighbour 1
  • New use_only_compiled option

    New use_only_compiled option

    If set to TRUE, Smarty will use only compiled templates, also ignoring the (in)existence of base templates. Compiled filenames will be constant and relative to the template basename. Useful to use pre-compiled templates and distribute them already compiled on production websites. Overrides and disables $merge_compiled_includes

    opened by gtozzi 0
  • Fix PHP8.1 deprecation warnings on null string in modifiers

    Fix PHP8.1 deprecation warnings on null string in modifiers

    I noticed that if one is calling |truncate on null, it triggers E_DEPRECATED: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated on PHP 8.1.

    This is expected, but given the modifier accepts null we may as well return an empty string before calling the function.

    opened by AdrienPoupa 3
Releases(v4.3.0)
  • v4.3.0(Nov 22, 2022)

    What's Changed

    • clean output buffer for Throwable instead of just Exception by @wisskid in https://github.com/smarty-php/smarty/pull/797
    • Fix wrong indentation in libs/plugins/modifier.capitalize.php by @MrPetovan in https://github.com/smarty-php/smarty/pull/802
    • fix compilation for caching templates by @Storyxx in https://github.com/smarty-php/smarty/pull/801
    • Fix Variable Expression by @JonisoftGermany in https://github.com/smarty-php/smarty/pull/808
    • Silence deprecation errors for strtime in PHP8.1 or higher by @wisskid in https://github.com/smarty-php/smarty/pull/811
    • Fixed PHP8.1 deprecation errors passing null to parameter in trim by @IT-Experte in https://github.com/smarty-php/smarty/pull/807
    • Re-organize all testrunners to use the same script(s). by @wisskid in https://github.com/smarty-php/smarty/pull/812
    • Fixed PHP8.1 deprecation errors in strip_tags by @wisskid in https://github.com/smarty-php/smarty/pull/803
    • #155 Adapt Smarty upper/lower functions to be codesafe (e.g. for Turkish locale) by @asmecher in https://github.com/smarty-php/smarty/pull/586
    • Bug fix for underscore in template name by @EDCScott in https://github.com/smarty-php/smarty/pull/581
    • Using PHP functions as modifiers now triggers a deprecation notice. by @wisskid in https://github.com/smarty-php/smarty/pull/814
    • Use 'DIR' instead of 'dirname(FILE)' by @MekDrop in https://github.com/smarty-php/smarty/pull/817
    • Fixed several typos and grammar errors by @AndrewDawes in https://github.com/smarty-php/smarty/pull/821
    • PHP8.2 compatibility by @Progi1984 in https://github.com/smarty-php/smarty/pull/775
    • Make SmartyCompilerException play nicer with error handler libraries by @Hunman in https://github.com/smarty-php/smarty/pull/782
    • Change file permissions for directories and respect umask for files by @wisskid in https://github.com/smarty-php/smarty/pull/828

    New Contributors

    • @MrPetovan made their first contribution in https://github.com/smarty-php/smarty/pull/802
    • @Storyxx made their first contribution in https://github.com/smarty-php/smarty/pull/801
    • @asmecher made their first contribution in https://github.com/smarty-php/smarty/pull/586
    • @EDCScott made their first contribution in https://github.com/smarty-php/smarty/pull/581
    • @MekDrop made their first contribution in https://github.com/smarty-php/smarty/pull/817
    • @AndrewDawes made their first contribution in https://github.com/smarty-php/smarty/pull/821
    • @Progi1984 made their first contribution in https://github.com/smarty-php/smarty/pull/775

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.2.1...v4.3.0

    Source code(tar.gz)
    Source code(zip)
  • v4.2.1(Sep 14, 2022)

    If you use the {mailto} plugin in your templates, please check if you are escaping the address value explicitly like this {mailto address=$htmladdress|escape}. This could cause problems through double escaping.

    What's Changed

    Security

    • Applied appropriate javascript and html escaping in mailto plugin to counter injection attacks #454

    Fixed

    • Fixed PHP8.1 deprecation errors in modifiers (upper, explode, number_format and replace) #755 and #788
    • Fixed PHP8.1 deprecation errors in capitalize modifier #789
    • Fixed use of rand() without a parameter in math function #794
    • Fixed unselected year/month/day not working in html_select_date #395

    New Contributors

    • @mfettig made their first contribution in https://github.com/smarty-php/smarty/pull/755

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.2.0...v4.2.1

    Source code(tar.gz)
    Source code(zip)
  • v3.1.47(Sep 14, 2022)

    If you use the {mailto} plugin in your templates, please check if you are escaping the address value explicitly like this {mailto address=$htmladdress|escape}. This could cause problems through double escaping.

    Security

    • Applied appropriate javascript and html escaping in mailto plugin to counter injection attacks #454

    Fixed

    • Fixed use of rand() without a parameter in math function #794
    • Fixed unselected year/month/day not working in html_select_date #395
    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Aug 1, 2022)

    What's Changed

    • add local testrunners for all supported PHP versions using docker. by @wisskid in https://github.com/smarty-php/smarty/pull/770
    • Fix PHP 8.1 htmlspecialchars deprecation by @gkreitz in https://github.com/smarty-php/smarty/pull/766
    • Do not use obsolete smarty properties '_dir_perms', '_file_perms', 'p… by @wisskid in https://github.com/smarty-php/smarty/pull/772
    • Update to HTML5-syntax in debug template by @JonisoftGermany in https://github.com/smarty-php/smarty/pull/599
    • Merge branch 'fix-issue-549-v3' of github.com:AnrDaemon/smarty into A… by @wisskid in https://github.com/smarty-php/smarty/pull/771
    • Fixed second param of unescape modifier by @wisskid in https://github.com/smarty-php/smarty/pull/778

    New Contributors

    • @gkreitz made their first contribution in https://github.com/smarty-php/smarty/pull/766
    • @JonisoftGermany made their first contribution in https://github.com/smarty-php/smarty/pull/599

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.1.1...v4.2.0

    Source code(tar.gz)
    Source code(zip)
  • v3.1.46(Aug 1, 2022)

    What's Changed

    • Fixed replace modifier by converting encoding if needed by @AnrDaemon in https://github.com/smarty-php/smarty/pull/740
    • Fixed second param of unescape modifier by @wisskid in https://github.com/smarty-php/smarty/pull/779

    Full Changelog: https://github.com/smarty-php/smarty/compare/v3.1.45...v3.1.46

    Source code(tar.gz)
    Source code(zip)
  • v4.1.1(May 17, 2022)

    Security

    • Prevent PHP injection through malicious block name or include file name. This addresses CVE-2022-29221

    Fixed

    • Exclude docs and demo from export and composer #751
    • PHP 8.1 deprecation notices in demo/plugins/cacheresource.pdo.php #706
    • PHP 8.1 deprecation notices in truncate modifier #699
    • Math equation max(x, y) didn't work anymore #721
    • Fix PHP 8.1 deprecated warning when calling rtrim #743
    • PHP 8.1: fix deprecation in escape modifier #727
    Source code(tar.gz)
    Source code(zip)
  • v3.1.45(May 17, 2022)

    Security

    • Prevent PHP injection through malicious block name or include file name. This addresses CVE-2022-29221

    Fixed

    • Math equation max(x, y) didn't work anymore #721
    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Feb 6, 2022)

    Added support for PHP 8.1.

    What's Changed

    • PHP 8.1 compatibility (without IntlDateFormatter) by @thirsch in https://github.com/smarty-php/smarty/pull/713
    • Updating PHP 8.0 to 8.1 in the docs. by @thirsch in https://github.com/smarty-php/smarty/pull/717

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.0.4...v4.1.0

    Source code(tar.gz)
    Source code(zip)
  • v4.0.4(Jan 17, 2022)

    What's Changed

    • Support multiple operators in math equations by @caugner in https://github.com/smarty-php/smarty/pull/708

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.0.3...v4.0.4

    Source code(tar.gz)
    Source code(zip)
  • v3.1.44(Jan 17, 2022)

  • v4.0.3(Jan 10, 2022)

    What's Changed

    • Prevent evasion of the static_classes security policy. This addresses CVE-2021-21408

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.0.2...v4.0.3

    Source code(tar.gz)
    Source code(zip)
  • v3.1.43(Jan 10, 2022)

    Prevent evasion of the static_classes security policy. This addresses CVE-2021-21408

    Full Changelog: https://github.com/smarty-php/smarty/compare/v3.1.42...v3.1.43

    Source code(tar.gz)
    Source code(zip)
  • v4.0.2(Jan 9, 2022)

    Prevent arbitrary PHP code execution through maliciously crafted expression for the math function. This addresses CVE-2021-29454

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.0.1...v4.0.2

    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Jan 9, 2022)

    What's Changed

    • Rewrote the mailto function to not use eval when encoding with javascript
    • Feature/add docs by @wisskid in https://github.com/smarty-php/smarty/pull/689
    • Fix for php 8.0 by @pandarek in https://github.com/smarty-php/smarty/pull/687
    • Fix a typo by @marclaporte in https://github.com/smarty-php/smarty/pull/690

    New Contributors

    • @pandarek made their first contribution in https://github.com/smarty-php/smarty/pull/687
    • @marclaporte made their first contribution in https://github.com/smarty-php/smarty/pull/690

    Full Changelog: https://github.com/smarty-php/smarty/compare/v4.0.0...v4.0.1

    Source code(tar.gz)
    Source code(zip)
  • v3.1.42(Jan 9, 2022)

    Prevent arbitrary PHP code execution through maliciously crafted expression for the math function. This addresses CVE-2021-29454

    Full Changelog: https://github.com/smarty-php/smarty/compare/v3.1.41...v3.1.42

    Source code(tar.gz)
    Source code(zip)
  • v3.1.41(Jan 9, 2022)

  • v4.0.0(Nov 25, 2021)

  • v2.6.32(Oct 22, 2021)

  • v4.0.0-rc.0(Oct 13, 2021)

  • v3.1.40(Oct 13, 2021)

    Improved javascript escaping. And Smarty now logs a warning if an unsupported escape type is used to stop you from accidentally using $var|escape:quote and not actually quoting anything.

    Source code(tar.gz)
    Source code(zip)
  • v3.1.39(Feb 17, 2021)

  • v3.1.36(Aug 22, 2020)

  • v3.1.35(Apr 13, 2020)

    • remove whitespaces after comments https://github.com/smarty-php/smarty/issues/447
    • fix foreachelse on arrayiterators https://github.com/smarty-php/smarty/issues/506
    • fix files contained in git export archive for package maintainers https://github.com/smarty-php/smarty/issues/325
    • throw SmartyException when setting caching attributes for cacheable plugin https://github.com/smarty-php/smarty/issues/457
    • fix errors that occured where isset was replaced with null check such as https://github.com/smarty-php/smarty/issues/453
    • unit tests are now in the repository
    Source code(tar.gz)
    Source code(zip)
  • v3.1.34(Nov 5, 2019)

  • v3.1.33(Sep 12, 2018)

    This release does cover security issue CVE-2018-16831, other bug fixes (see changelog.txt) and adds a new feature of the {capture} tag (see NEW_FEATURES.txt).

    Source code(tar.gz)
    Source code(zip)
  • v3.1.32(Apr 24, 2018)

  • v2.6.31(Nov 22, 2017)

  • v3.1.31(Dec 14, 2016)

Owner
Smarty PHP Template Engine
Smarty PHP Template Engine
The free-to-use template for your Imagehost-website made with PHP, HTML and CSS!

The free-to-use template for your Imagehost-website made with PHP, HTML and CSS! Some information before we start This repo is only code related, to a

Ilian 6 Jul 22, 2022
The free-to-use template for your Imagehost-website made with PHP, HTML and CSS!

The free-to-use template for your Imagehost-website made with PHP, HTML and CSS! Some information before we start This repo is only code related, to a

Ilian 6 Jul 22, 2022
PHP template engine for native PHP templates

FOIL PHP template engine, for PHP templates. Foil brings all the flexibility and power of modern template engines to native PHP templates. Write simpl

Foil PHP 167 Dec 3, 2022
☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites.

Latte: amazing template engine for PHP Introduction Latte is a template engine for PHP which eases your work and ensures the output is protected again

Nette Foundation 898 Dec 25, 2022
View template engine of PHP extracted from Laravel

Blade 【简体中文】 This is a view templating engine which is extracted from Laravel. It's independent without relying on Laravel's Container or any others.

刘小乐 143 Dec 13, 2022
⚡️ Simple and fastly template engine for PHP

EasyTpl ⚡️ Simple and fastly template engine for PHP Features It's simple, lightweight and fastly. No learning costs, syntax like PHP template It is s

PHPPkg 19 Dec 9, 2022
Twig Template Engine to Phalcon PHP

Twig Template Engine to Phalcon PHP

Vinicius 4 Oct 7, 2022
Liquid template engine for PHP

Liquid is a PHP port of the Liquid template engine for Ruby, which was written by Tobias Lutke. Although there are many other templating engines for PHP, including Smarty (from which Liquid was partially inspired)

Harald Hanek 230 Aug 18, 2022
Pug (Jade) template engine for Symfony

Pug-Symfony Pug template engine for Symfony This is the documentation for the ongoing version 3.0. Click here to load the documentation for 2.8 Instal

Pug PHP 41 Dec 16, 2022
PHPlater, a simple template engine.

PHPlater A simple PHP template engine that lets PHP do all the logic and then append it to the HTML in the template file. It is set to solve the probl

John Larsen 2 Jun 3, 2022
A template abstraction prototype for PHP template engines

Schranz Templating A template abstraction prototype for PHP template engines. This project should help to find a way for a general Template Render Int

Schranz Templating 16 Dec 7, 2022
Prosebot is a template-based natural language generation application

Prosebot is a template-based natural language generation application. Throughout the last years, ZOS has been developing Prosebot, alongside their collaboration with FEUP, as part of the zerozero.pt project.

Zerozero 12 Dec 15, 2022
Standalone Skeltch templating engine for PHP

SkeltchGo is a standalone version of Glowie Skeltch templating engine for PHP, intented to use from outside the framework.

glowie 1 Nov 5, 2021
SwitchBlade: Custom Directives for the Laravel Blade templating engine

SwitchBlade: Custom Directives for the Laravel Blade templating engine

Awkward Ideas 10 Nov 29, 2022
Experimental ActiveRecord layer on top of Doctrine2 using the Twig templating engine

This is an experiment for building ActiveRecord functionality on top of Doctrine2 using the Twig templating engine. Whether it is called Propel2 or not is irrelevant.

Francois Zaninotto 85 Dec 5, 2022
A PHP project template with PHP 8.1, Laminas Framework and Doctrine

A PHP project template with PHP 8.1, Laminas Framework and Doctrine

Henrik Thesing 3 Mar 8, 2022
Twig, the flexible, fast, and secure template language for PHP

Twig, the flexible, fast, and secure template language for PHP Twig is a template language for PHP, released under the new BSD license (code and docum

Twig 7.7k Jan 1, 2023
Native PHP template system

Plates Plates is a native PHP template system that's fast, easy to use and easy to extend. It's inspired by the excellent Twig template engine and str

The League of Extraordinary Packages 1.3k Jan 7, 2023
A complete and fully-functional implementation of the Jade template language for PHP

Tale Jade for PHP Finally a fully-functional, complete and clean port of the Jade language to PHP — Abraham Lincoln The Tale Jade Template Engine brin

Talesoft 91 Dec 27, 2022