We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26072
    • 2 Posts
    Hi everyone! Have been trying to find the answer to this question for awhile so I thought I’d ask here and see if anyone can help me.

    How do you manage comments in modx? Specifically, how do you delete them? I have an issue with a website I’m in charge of that has a huge spam problem. I’ve restricted the comments to registered users only...but that doesn’t get rid of the thousands of spam comments. Is there some way to delete all the comments?

    Thanks in advance for helping me out! smiley
      • 4310
      • 2,310 Posts
      I had a similar problem last year, Jot didn’t have a mass delete facility.
      I’m pretty sure I had some code that I ran to delete all unpublished comments from the database.
      Is that what you meant?
      Just found the snippet...
      <?php
      $query=$modx->db->query
      ("DELETE FROM `modx_jot_content` WHERE `published` = 0");
      ?>
      

        • 33337
        • 3,975 Posts
        This is in very beginning, but hope it will help you: http://modxcms.com/forums/index.php/topic,14402.0.html

        regards.
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 26072
          • 2 Posts
          Thanks for your help guys. smiley

          I’ve found that I can delete the comments in the database SQL file - I hadn’t though of looking there! rolleyes