We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17412
    • 270 Posts
    Hi, has anyone written a snippet that can grab the latest 5 or so comments from an instance of ditto/jot ?
    Been on a huge hunt for this though can’t find any code.. It’d be a decent tip for the Jot wiki if it has been done.

    Thanks.
      • 7923
      • 4,213 Posts


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17412
        • 270 Posts
        Excellent, thanks Doze.
        Got that working. Couple of issue though that I can’t see how to resolve with the available parameters. ( http://wiki.modxcms.com/index.php/Jot#Parameters )

        Namely, you have to specify a docid - so you can only grab comments from one news item - not all news items in general.
        There appears to be no way to limit the number of comments displayed. (great for destroying designs smiley

        Apart from that :0 hunky dory.

          • 7923
          • 4,213 Posts
          Hmm.. sounds odd that there would be no parameter to limit retrived comment count.. it could be undocumented, i have to check it.. but you can enable paging with 5 comments per page and remove the page navigators from your custom template.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 17412
            • 270 Posts
            Quote from: doze at Jul 27, 2007, 09:01 AM

            Hmm.. sounds odd that there would be no parameter to limit retrived comment count.. it could be undocumented, i have to check it.. but you can enable paging with 5 comments per page and remove the page navigators from your custom template.

            Thanks for the workaround idea!