We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4195
    • 398 Posts
    Plugin code *updated* (use instead of txt in the archive)
      Armand Pondman
      MODx Coding Team
      :: Jot :: PHx
      • 18219
      • 826 Posts
      Hi Bs,

      Thanks to the new version (1.1.0).
      For information : TBS left a new version 3.1.1 to fix some bugs.
        Marc
        I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
        • 26083
        • 32 Posts
        Problem with version 1.1.1 :

        $chunk = '[{doc.createdby}] - [{params.yes}]/[{params.no}]';
        
        $tpl = $modx->tbsTpl->addTemplate($chunk);
        $modx->tbsTpl->addField($tpl,'params',array('yes'=>'YES','no'=>'NO'));
        return $chunk;
        


        Result is : 1 - [{params.yes}]/[{params.no}]
        So my variables even as an array is not transformed.
        What’s the problem ?

        UPDATED

        I found it: return $tpl;

        Fantastic !!!
          • 24292
          • 28 Posts
          I’ve installed TBS but I’m having a problem with date formatting.
          (1:[{doc.createdon}])
          (2:[{doc.createdon;frm='dd.mm.yyyy hh:nn:ss'}])
          (3:[{doc.pagetitle}]) 


          produces
          (1:1152608583)
          (2:’)
          (3:Contact Us)

          I’m using version 1.1.1
          Any ideas?
            • 24292
            • 28 Posts
            Solved
            I replaced the example I copied from this thread by removing the quotes ’
            [{doc.createdon;frm='dd.mm.yyyy hh:nn:ss'}]

            to
            [{doc.createdon;frm=dd.mm.yyyy hh:nn:ss}]

            and that works fine.