Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Just wondering: why still using Smarty 2.x?

oliverraduneroliverraduner Contributing to Vanilla since 2010Switzerland ✭✭

Hi there,

I am using Smarty 2 in a very different and very old project - and now, with Vanilla Forums 3.3 - I noticed, that it also & still uses this very old version of the Smarty template engine.

So I am wondering, why has Vanilla not yet moved to the much newer Smarty 3.x release? Is it still because of the community "dangers" & (addon/theme-)dependencies of existing Vanilla Forum solutions, as mentioned in the 2017 comment here?

This is just out of curiosity 😊

Cheers

Comments

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff

    @oliverraduner What happened is that we've stopped using Smarty entirely in new code. It never real caught on anywhere except for in theme master views anyways.

    We've been using Twig for a while, although I guess we never really document it well. I'm overhauling our dev docs at the moment though, and the Twig documentation will definitely make it in.

    You can see the new WIP docs here.

    How to use twig?

    Anywhere that you would put a PHP or Smarty view you can just put a .twig file instead and it will be picked up. A lot of the usage has been in cloud-only plugins right now, but you can see the category add/edit view is in twig now https://github.com/vanilla/vanilla/blob/master/applications/vanilla/views/vanillasettings/editcategory.twig

    The next update will come with twig docs and support for writing theme master views in twig as well!

    phreakoliverraduner
Sign In or Register to comment.