We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    I spent most of today working on Ditto 1.1 and have successfully integrated PHx into it. Now, for the big question. How far do I take the integration? I can remove the date and summarization code and utilize PHx or PHx extensions for that. However, this would break backwards comatibility. So, what is your opinion?
      • 18397
      • 3,250 Posts
      Here is an example of the difference:

      Instead of having &dateSource &dateFormat in the snippet call you would have the following in your tpl

      [+createdon:date=`%a %B %d, %Y at %H:%M`+]

      The issue is whether or not to pull a large number of lines that handles date formatting an truncation (mostly the truncation) out of the Ditto core.

      If I do, Ditto will run faster and have a cleaner codebase
      If I don’t then it will still be backwards compatible
        • 25663 MODX Staff
        • 12,272 Posts
        Faster + a migration guide is my vote.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 26435
          • 1,193 Posts
          Quote from: rthrash at Nov 12, 2006, 06:34 PM

          Faster + a migration guide is my vote.

          2nd that!

          -sD-
            Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
            All of the above... in no specific order.


            I send pointless little messages
            • 6726
            • 7,075 Posts
            +1 for me.

            I don’t see migration being a big problem, a few templates ckunk to edit, that should be a matter of minutes.
            Speed is essential, so is having a better control of the output.

            This is really great Mark !
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 22815
              • 1,097 Posts
              Increasing compatibility with other MODx bits has to be better than retaining legacy compatibility. This also means that more documentation can apply to multiple snippets.

              Actually, it looks like you could just output the correct new code to the debug output if the old variables are set, something like
              "&dateSource and &dateFormat deprecated. Please add [+" . $dateSource . ":date=`" . $dateFormat . "`+] to your template."


              And if it is just that dates won’t show and content won’t be truncated, then this doesn’t seem to completely "break" existing snippet calls. If it did, then I’d recommend calling it Ditto 2. But this seems a simple enough change.

              Sounds great, btw.
                No, I don't know what OpenGeek's saying half the time either.
                MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                Forum: Where to post threads about add-ons | Forum Rules
                Like MODx? donate (and/or share your resources)
                Like me? See my Amazon wishlist
                MODx "Most Promising CMS" - so appropriate!