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
    Can everyone try this out at their earliest convience as I would like to release it tomorrow. Thanks!

    It is lacking updated documentation ATM as I do not have access to my Mac ... long story...

    Does anyone object if I put the documentation on the main modxcms.com site (alongside NL’s) since I can’t edit the word files and merge them into a PDF?

    UPDATE:

    [2006-07-05: REVISION 1003]

    [FIXED] getCreatedBy now properly falls back to admin user
    JSON nolonger has extra parentheticals surroundings its output
    multiLevel and descendentDepth repaired

    [NEW] minor performance enhancements (mostly consolidation of ifs)
      • 6726
      • 7,075 Posts
      Okay Mark I’ll try to give it a test drive sometime today !

      Primarily a bugfix release (I am thinking the sort order thingy) or is there any new feature ?

      Okay nevermind, it’s all in the changelog tongue



      [NEW] document permissions now upheld

      [CHANGED] getCreatedBy now uses API functions
      getDocuments now only uses $modx->getDocuments for improved performance

      [FIXED] internal advancedsort now works properly

      [TODO] add start and total to documentation

      I think this answers it smiley
      Great !

      I hope there is nothing wrong with your Mac...
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 15987
        • 786 Posts
        Mark,
        I tested this out this morning and have found one problem. It appears to be ignoring the multilevel setting. Where I have ditto called it is dispalying the posts which are folders and it is also displaying the comments which are documents under each folder. I tried setting multiLevel=0 even though that is the default and it did not change. Let me know if I am just missing something or if this is truly an error. smiley

        Kyle

        Here is my snippet call:

        [!Ditto?startID=`18` &summarize=`5` &tpl=`nl_post` &truncSplit=`false`!]
          • 15987
          • 786 Posts
          Mark,
          I have been using the json output to get a blog calendar snippet setup. I first started to write some code to parse the json output but then decide to use the JSON-PHP class to handle that for me. When I first used the class I wasn’t getting any output so I looked at the format of the output file to see if it was in the correct json format. I may be wrong about this so let me know if there is a reason for it, but the output gets surrounded by parenthesis and when the decode method is called it returns nothing. If these parenthesis are removed it is parsed correctly and the data object is returned. I looked through some docs on json and can’t find anything about parenthesis being used to format the content.

          Here is a link to the examples I found: http://www.json.org/example.html

          So I think the beginning (line 240) and end (line 252) parenthsis need to be removed.

          Also the extra white space that gets included on lines 256 & 266 is not necessary.

          It would be great if these changes made it into the next version.

          Kyle
            • 18397
            • 3,250 Posts
            Kyle,

            Thank you for both of your findings.

            Yes, multilevel was not working. I have since fixed it in my code.
            I made your suggested changes RE: JSON in my code
              • 18397
              • 3,250 Posts
              [2006-07-05: REVISION 1003] now ready for testing (see first post)

              OOPS: Ummmm, that should have read 7-6..... I’ll fix that later....
                • 6726
                • 7,075 Posts
                Just a remark, the snippet.ditto.php file reads
                * Version: 1.0.1
                * Last Edited: 04-Jun-2006

                I’ll try to test this today and report !
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 33014 ☆ A M B ☆
                  • 1,231 Posts
                  http://modxcms.com/forums/index.php/topic,5669.0.html

                  Japanese langfiles here. (utf-8, euc-jp)
                    • 32963
                    • 1,732 Posts
                    Very nice work Mark.

                    Keep it up.
                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 6726
                      • 7,075 Posts
                      I have noticed one thing after switching to 1.0.2 : it seems that descendentDepth parameter doesn’t have the same default as before (seems it was one level default, and now is infinite -> my template didn’t work without adding descendentDepth=`1`). Not a problem, but I had to do some investigating...

                      Other than that, working just great smiley
                        .: COO - Commerce Guys - Community Driven Innovation :.


                        MODx est l'outil id