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
    Laughs! I figured out the problem... simple things simple things......

    Look for 1.0.1 later today which will fix all these things and add one more new feature--- tagging.
      • 18397
      • 3,250 Posts
      Ok, here is the fix for those who cannot wait.

      Replace:
      	} else if(file_exists($filevalue) &&  $filename == "language") {
      		include_once($filevalue);
      


      with

      	} else if(file_exists($filevalue) &&  $filename == "language") {
      		include($filevalue);
      


      That fixs things for allowing multiple calls.
        • 29635
        • 361 Posts
        Great snippet! But has anybody noticed that the dates in the archive display seem to be a little off?

        For instance, if I set sortBy=`pub_date`, the archive still displays the createdon date. If I set the archiveDateType=`pub_date` it displays the correct dates, but does not categorize them by month properly, so articles posted in March still show up as sub-items of May.

        Check an example: http://sp.themancan.com/41/articles.html. The top is Ditto, the bottom is NewsListing. Ditto has the last article under May when it should be under March.

        Is this the intended behaviour or a bug? Seems like it’d be nice to have the option for sortBy and archiveDateType to be different, but that dateFormatType and archiveDateType should inherit the sortBy value if not otherwise declared.

        Great snippet though. Love the customizability.
        -Brett
          Need MODx Ecommerce? Try FoxyCart!
          • 33453
          • 141 Posts
          Quote from: Mark at May 15, 2006, 02:26 PM

          That fixs things for allowing multiple calls.

          It certainly does - though, for the life of me, I cannot see why huh!

          Thanks, Mark.
            • 18397
            • 3,250 Posts
            @The Man Can! : The first part of what you describe is an intentional feature. The manager only sets published_on and fields like it if the value is set. By default, the values are 0. Since that messes up sorting, an inline SQL if is used to swap out createdon for published_on if published_on is not set. That way it still gets sorted instead of Ditto freaking out. For you other issue, use both sortBy=`pub_date` and archiveDateType=`pub_date` in the same call. That should fix things.

            @Zenmaster: I’ve got a pretty good idea but am not 100% sure. I believe since all the lang file does is set variables if it is kept in the system memory (include_once) it only sets the variables the first time it is run. But, when it is called each time (include) the variables get set every time. Make sense?
              • 29635
              • 361 Posts
              Quote from: Mark at May 16, 2006, 02:10 PM

              For you other issue, use both sortBy=`pub_date` and archiveDateType=`pub_date` in the same call. That should fix things.
              Thanks for the very clear explanation, Mark. For the second issue, I’m doing that already, so I think it’s a bug? Here’s my call:
              [!Ditto? &startID=`83` &summarize=`0` &dateFormatformat=`%b %d, %Y` &dateFormatType=`pub_date` &sortBy=`pub_date` &archiveDateType=`pub_date` !]

              Thoughts?
              Edit: I’ve removed the NewsListing call on that page that I linked to earlier, so it’s only the Ditto snippet (as called above), that’s sorting articles by pub_date, but is not putting different months under different sections. I hope that makes sense.
                Need MODx Ecommerce? Try FoxyCart!
                • 4273
                • 356 Posts
                I have a simple question, why is it called Ditto and not newsletter ? What’s with the ditto huh
                  SMF Bookmark Mod - check it out
                  http://mods.simplemachines.org/index.php?mod=350
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Because it’s much more useful than just for newsletters.

                  FAQs
                  Blogs
                  Press Release archives
                  Executive Bios
                  Image Galleries
                  Real Estate Listings
                  And so on...

                  "Ditto" is a shorthand way to say "repeat what’s above", and that’s almost exactly what this snippet does: repeats content that exists elsewhere.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 8471
                    • 333 Posts
                    Hi, here you can find the Italian language for Ditto wink

                    http://modxcms.com/forums/index.php/topic,4624.0.html
                      Sorry for my bad English grin
                      • 3763
                      • 155 Posts
                      @ Mark

                      If I the folder has no subfolders or documents (nothing to show), the chunk is still shown but empty.
                      <div class="ditto_summaryPost">
                         <h3><a href="[~~]"></a></h3>
                         <small></small>
                         <div></div>
                         <p></p>
                         <div style="text-align:right;">by <strong></strong></div>
                      </div>


                      Can this be avoided with the current snippet or if not, can you do this for the next release?

                      Thanks, Boby.
                        ...my Photo Gallery on Flickr...

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