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
    Ladies and gentlemen, I present to you Ditto 2.0! It still has a few things left (for details see notes.txt) but is just about feature complete. It is a complete rewrite of Ditto and should be much faster as it only retrieves the needed fields. I hope to release this Sunday to the public complete with a Ditto 2.0 orientation screencast.

    The major changes:

    The "tv" prefix is no longer required! Remember that TVs will now override their database counterparts like in MODx itself, except when sorting. Furthermore, tv prefixes will still continue to function in templates only. They will need to removed in the Ditto call however.

    User created custom placeholders & custom filters are now possible without editing the Ditto core

    [+tags+] is now [+tagLinks+] to avoid naming conflicts

    QE # prefixed links now work with MODx 0.9.5

    Certain parameters have been renamed or altered (complete list coming soon)

    Ditto ID is now after the var in the form varname_dittoID

    Please test this release extensively!

    Thanks,
    Mark
      • 18397
      • 3,250 Posts
      Note: Alot of the placeholders that can now be done with PHx are now gone such as the date parameter.

      The screencast will walk you (the user) in upgrading to 2.0.
        • 15987
        • 786 Posts
        Mark,
        Looks great, I will definatly test this out later today.
          • 15987
          • 786 Posts
          Mark,
          I think I may have found a bug. With pagination enabled, you can page through the psots, but when you get to the last page it throws an error:

          PHP error debug
            Error: 	Invalid argument supplied for foreach()	 
            Error type/ Nr.: 	Warning - 2	 
            File: 	C:\Program Files\xampp\htdocs\devbranch\assets\snippets\ditto\classes\ditto.class.inc.php	 
            Line: 	132	 
            Line 132 source: 	foreach ($resource as $name=>$value) {
          


          This was just some basic testing with the default content.
            • 15987
            • 786 Posts
            Mark,
            Got another one for you. If no results are returned and pagination is enabled, the pagination information still displays. Says: Showing 1 - 1 of 1 Articles
            There is also a 1 below where the navigation usually is.

            If there are fewer articles than set with the summarize parameter, the paging navigation displays a 1 also.
              • 11975
              • 2,542 Posts
              Hi,

              thanks mark for this new release.

              I’ve installed it locally (PHP 4.3.1 / MYSQL 5)
              At first run Some error occurs because of debug class (cannot instantiante message)
              I had to sort differently some lines of the snippet to be sure to load the debug.class


              :-)

                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 11975
                • 2,542 Posts
                Mark,

                I’m testing with about ~2400 documents in Db

                Ditto 2.0 is twice faster than ditto 1 to render my documents list
                That’s really impressive.

                :-)
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 6726
                  • 7,075 Posts
                  Woosh !

                  Pretty good news indeed, as I said before many of my websites heavily rely on Ditto...
                  Can’t wait to try this baby grin
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 11975
                    • 2,542 Posts
                    for those who like figures smiley

                    Same call
                    Ditto 1.1
                    MySQL: 3.2536 s, 4426 request(s), PHP: 1.4238 s, total: 4.6773 s

                    Ditto 2.0
                    MySQL: 1.1410 s, 1353 request(s), PHP: 1.3468 s, total: 2.4878 s,
                      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                      • 18397
                      • 3,250 Posts
                      Kyle, I am unable to duplicate the errors you are experiencing. As for "If no results are returned and pagination is enabled, the pagination information still displays. Says: Showing 1 - 1 of 1 Articles" this has always been the case. However, the latter part should say 0’s where there are 1s. I will look into that.

                      @heliotrope: What changes did you need to make and what was the exact error message? Great to hear of the performance increases!

                      Thanks!