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
    Whats new in Ditto 2?

    • New document and TV retrieval logic for up to 4x the performance of Ditto 1 when used with large quantities of documents
    • No more tv prefixes!
    • PHx support
    • Optional randomization of the results
    • Extender architecture to allow users to expand Ditto’s functionality and create their own custom placeholders
    ⁃ Request extender for functionality like DittoMachine
    ⁃ Date and Summary placeholders have been moved to extenders
    • More powerful debug mode for quicker troubleshooting
    • Archives have been removed and recreated in the new snippet Reflect available in the Ditto package as reflect.snippet.inc.php
    • QE style placeholders with edit links now possible via the [+#item+] syntax
    • Tags now support multiple tagData sources in a comma delimited fashion and the [+tags+] placeholder for a nice tag list
    • It is now possible to have multiple Ditto calls with url based features on one page thanks to the id parameter
    • A new config architecture allowing users to create config files in the config directory with the simple php variable syntax
    • Added new @bindings for templates including @CODE: and @FILE: for their respective purposes
    • New formats including XML and ATOM
    • Parents and documents options now available, start ID deprecated (will still work though...)
    • Added between filtering for dates for use in conjunction with Reflect based archives or custom links
    • The obligatory much much more...

    You can download an SVN export at the bottom of this post
    You can file bugs here: http://www.modxcms.com/ditto

    Enjoy!

    Version control provided by the awesome guys at CVS Dude

    [html]<a href="http://cvsdude.com" alt="CVSDude : CVS, Subversion, Trac source control and project management hosting"> <img border="0" src="http://cvsdude.com/image/cvsdude_tag.jpg"></a> [/html]
      • 17329
      • 53 Posts
      Mark,
      First, thanks very much for sharing your work on ditto with us. This is a long awaited update for me.
      I have a question on this new version.
      I’ve been using 1.1b2 so far and I had to hack into the function customSort() (in functions.class.inc.php) in order to handle a custom sorting on a TV that was a date as you can see in the following code. :

      [!Ditto? ... &dateSource=`tvEventDate` &sortBy=`tvEventDate` !]

      With the new version the function customSort() as well as the file functions.class.inc.php are gone.
      Does Ditto now support sorting on date TV so my hack is useless ? Or if not, where would I handle that with the new version.
      Thanks
      lionel
        • 17329
        • 53 Posts
        I’ve just found the answer myself. I should have read the doc before to ask smiley
        This is awesome Mark. Everything I needed.

        lionel
          • 20488
          • 353 Posts
          Great news smiley

          I have to test it tomorrow. Thanks a lot for this fantastic realease. Yes, I know that it WILL be great... smiley
            • 14050
            • 788 Posts
            Mark,

            Do you think it would be worthwhile to add a parameter that allows ditto to ignore case in tagging?

            For example. Currently the tags "Demo" and "demo" are considered unique. In most instances, this would not be the case and would just be error on the users part.

            Some parameter like &ignoreCase or &tagCaseSensitive.
              Jesse R.
              Consider trying something new and extraordinary.
              Illinois Wine

              Have you considered donating to MODx lately?
              Donate now. Every contribution helps.
              • 25663 MODX Staff
              • 12,272 Posts
              Good point jesster444 ... I’d vote for making the case insensitive, period, or at least default to case insensitive.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 14050
                • 788 Posts
                I would definitely default to case insensitive, and am having trouble envisioning a time where you would want it otherwise, but in MODx tradition, I would allow it to be configurable, via parameters, so it is as flexible as possible.
                  Jesse R.
                  Consider trying something new and extraordinary.
                  Illinois Wine

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 18397
                  • 3,250 Posts
                  Done. Take a look at the SVN head.

                  [NEW] caseSensitive option for tagging to determine whether or not the tag filter is case sensitive

                  This just affects the filter at the moment. I’ll need to make another commit to handle the visual output.

                  Should it default to being case sensitive or insensitive?

                  lol... you people are answering my questions each time I hit post....
                    • 32847
                    • 171 Posts
                    Hello and thank you for this update,

                    I have a strange bug but may be I missed something, I have two instances of Ditto in the same page and I call
                    &extenders=`date`

                    in the two configs. However, the date doen’t appear in the second instance undecided and it appears if I delete the first call of Ditto huh

                    I added unique id without any success, moreover sortby pub_date doesn’t work...
                      • 18397
                      • 3,250 Posts
                      Ok, just made another commit that should fix the extender issue.

                      @xeres, what do you mean sortby pub_date does not work? Could you run the call with &debug=`1` and copy and paste the output here?

                      This discussion is closed to further replies. Keep calm and carry on.