We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18990
    • 5 Posts
    How to make Last comments snipet? huh
    • You need to provide a little more information on what you want to do. Do you mean a way to display (for example) the latest five comments?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 18990
        • 5 Posts
        Yes i whant to display the latest five comments form all site folders to index page.
        • Do you mean the last five comments from each page with comments, or the latest five from all of the pages that have comments? Are you taking these comments from the document generated by the UserComments snippet?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 18990
            • 5 Posts
            Latest five comments from all of the pages that have comment.

            Her is example photo:
            • Now I understand what you want to do. Is the source of the comments the UserComments snippet? If so, it’s going to be a bit complicated.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 18990
                • 5 Posts
                Today i search in this forum and in site www.modxcms.com. for a theme the last comments, but my searches were not successful. I tried to do something, but I can not arrive at that the last komments show. There is decision as it can arrive at that MODX shows comments from the all site comments?
                  • 32241
                  • 1,495 Posts
                  The easiest hack that you can achieve will be to see into the usercomment snippet, and look for the place where the snippet store the newly created usercomment. On that part, you need to add a code to fetch that new comment and store it in text file or modx page maybe, and keep the storage for that last comment to 5 at most. So with this, when you fetch the data on that storage, you will always have the latest 5 posts from the whole MODx page.

                  Hope it does inspire you to start hacking the snippet
                    Wendy Novianto
                    [font=Verdana]PT DJAMOER Technology Media
                    [font=Verdana]Xituz Media
                    • 18990
                    • 5 Posts
                    Thank you for the suitable advice. I will try to do it, it is important for my site to show the last comments. Monster that cms systems as a function of the drupal,wordpress,mambo last comments there is already in, but MODX such are not. I suppose that MODX is more good for other CMS.
                    • Actually, I think we could use the built in show last X number of posts in UserComments with the multi-folder stuff from newslisting. I think Mark has his next order of business now! lol
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me