We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23491 ☆ A M B ☆
    • 1,056 Posts
    Ditto 2.0.2 / MODx 0.9.6 (for DittoCal)

    Snippet call:
    [!Ditto?startID=`8` &summarize=`100` &format=`json` &dateFormat=`%d-%m-%Y` &sortDir=`desc` &hidePrivate=`0`!]
    


    1. startId = Folder ( 8 ), which is tied to a web user group for security. Both children docs (calendar entries) also have security access permissions, but hidePrivate=`0` doesn’t reveal the documents as I was hoping??

    2. dateFormat doesn’t appear to work, JSON result set still shows date as "1180940590" (unix time)

    When I remove the security from startId Folder (doc_id 8 and children) everything works fine as expected (except dateFormat?), including DittoCal. Is &hidePrivate active in this release?

    Update: I just did a complete grep against the assets/snippets/ditto/ directory, and I could not find any instances of the term "hidePrivate"? I did not find anything in the snippet itself, either...Hmmm, I am confused!
      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
      • 25663 MODX Staff
      • 12,272 Posts
      MIke file a bug on the ditto tracker (Trac) after checking the latest SVN version.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        Quote from: rthrash at Jun 05, 2007, 08:07 AM

        MIke file a bug on the ditto tracker (Trac) after checking the latest SVN version.

        Good call, Ryan. I will report back.
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 18397
          • 3,250 Posts
          1. hidePrivate is a parameter and does appear in the source code multiple times. Try downloading a fresh copy.

          2. To change the date in the JSON output you will need to create a custom template with [+json_date+] instead of [+json_createdon+]. However, this will break the latest version of DittoCal.
            • 23491 ☆ A M B ☆
            • 1,056 Posts
            Quote from: Mark at Jun 05, 2007, 10:07 AM

            1. hidePrivate is a parameter and does appear in the source code multiple times. Try downloading a fresh copy.

            2. To change the date in the JSON output you will need to create a custom template with [+json_date+] instead of [+json_createdon+]. However, this will break the latest version of DittoCal.

            OK, would you recommend a fresh copy of Ditto 2.0.2 over SVN?
              Mike Reid - www.pixelchutes.com
              MODx Ambassador / Contributor
              [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
              ________________________________
              Where every pixel matters.
              • 23491 ☆ A M B ☆
              • 1,056 Posts
              BTW, I downloaded a fresh 2.0.2 and did some global searching for just the word "private" and I only found 2 references in the entire download package:

              ditto.class.inc.php (Line 19):
              //<?php
              $this->constantFields["db"] = array("id","type","contentType","pagetitle","longtitle","description","alias","link_attributes","published","pub_date","unpub_date","parent","isfolder","introtext","content","richtext","template","menuindex","searchable","cacheable","createdby","createdon","editedby","editedon","deleted","deletedon","deletedby","publishedon","publishedby","menutitle","donthit","haskeywords","hasmetatags","privateweb","privatemgr","content_dispo","hidemenu");
              


              ditto.class.inc.php (Line 824):
              //<?php
              $access= ($modx->isFrontend() ? "sc.privateweb=0" : "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0") .
              


              I still couldn’t find "hidePrivate" (even case insensitive) anywhere... am I missing something, or is this specific to SVN? (checking now...)


              UPDATE!

              Wow...definitely was specific to the SVN. This is what I was looking for! I’ll give it a whirl smiley (Thx, Mark)
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 25564
                • 17 Posts
                Quote from: rthrash at Jun 05, 2007, 08:07 AM

                MIke file a bug on the ditto tracker (Trac) after checking the latest SVN version.

                file is corrupted :/

                is there any other resource area ?

                pls smiley
                  • 18397
                  • 3,250 Posts
                  The download server is experiencing some issues at the moment. If you need it now just check it out directly from http://svn3.cvsdude.com/ditto/codebase/trunk
                    • 25564
                    • 17 Posts
                    thx wink