HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Use locale definitions in default_master.tpl

edited September 2010 in Vanilla 2.0 - 2.8
can someone point me to a/the way to make use of the locale.php definitions in default_master.tpl?
SMARTY's {php} tag doesn't seem to work here.

Comments

  • weren't SMARTY {php} tags supposed to work?
    http://vanillaforums.org/blog/smarty-vs-php/
    I assumed that way I could make use of the T('') function but using {php} returns no output whatsoever. (LAMP/Lenny, PHP 5.2.14)

    unfortunately even the tutorials use hardcoded link names. (Dashboard, Discussions, ..) :(
    http://vanillaforums.com/blog/help-tutorials/how-to-use-custom-theme-part-1-edit-html/#code

    am I missing something here..?
  • as I'm obviously talking to myself I might as well answer my own questions:

    the use of SMARTY's {php} tags seem to be disabled in/library/core/class.smarty.php

    So unless there's no other switch or config setting to change or overrride this you can add $Smarty->security_settings['PHP_TAGS'] = TRUE; *after* line 77 $Smarty->security = TRUE; to enable the use of {php}.

    This way you can theme language independent and use eg {php}echo T('Discussions');{/php} in your .tpl file(s).

    don't know about you but to me this seems like an important option to have to get theming for vanilla rolling.

    I just started with vanilla so in case I re-invented the wheel pls let me know.
Sign In or Register to comment.