We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10
    • 16 Posts
    I have been busy working on content for my site, or at least trying to when the desire to work on the template doesn’t consume me as i try to learn modx.. so it has been a while since i have really looked over things, and i went to click one of the news items. You can imagine my surprise when i seen over 1,000 comments from "users" so i began to read over them.
    Every one of them, was porn or paxil or viagra links. Its going to take me at least an hour to sit and hand delete them all
    And that is just for one of the news items... they have done this to all of them.

    Spam sucks big time.. and this is really frustrating for me.

    So my question is .. is there a way to mass delete all of this garbage?
    and is there a way to set the comments not to auto publish until i can look them over first.
    Some kind of approval/validation system?
    Any maybe possibly, a ban by IP i am missing somewhere?

    I am really tired of these idiots attacking my forums and my blogs and my guest books with this stuff.
    But i don’t want to completely remove the comments options for the people who actually sit and read my tutorials and might have questions or comments that are valid, ya know?
    I will if i have to, its just so irritating that i am constantly having to shut down open communication on my site because of this.

    If anyone can help at all, thank you so much in advance
      • 4310
      • 2,310 Posts
      You could go into PHPMyAdmin or whatever your host uses for managing the database and empty the modx_jot_content table.
      Make a module named ’Delete Comments’ with the code below and run the module.
      $query=$modx->db->query
      ("DELETE FROM `modx_jot_content` WHERE `published` = 0");

      Both of theses will delete all comments that have not been published, so check through for genuine ones!
      Alternatively look around for Jot Dashboard on the forums, I don’t know if it was finished but it was a manager interface for comments.
        • 3749
        • 24,544 Posts
        michelle, Spam sucks all right.

        The closest thing to mass delete is Doc Manager.

        Modules | Doc Manager | Other Properties | Available Settings

        Unfortunately, you’ll have to know the document numbers of the ones you want to delete, although you can delete a range of documents (e.g. 30-52).

        There are various ways to slow the spammers down. You can set things so the documents are unpublished by default and then go through them and set them to published after you review them.

        You can ban IPs in the control panel of your hosting service but it’s not a very good solution for a number or reasons.

        Some people have implemented CAPTCHA images that require a human to verify the image but they’re a pain for users.

        What most sites do now is make people register (and often have a CAPTCHA image on the registration page), then let only registered users (who you can easily ban) post.

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 10
          • 16 Posts
          Thank you both so very much.. i have not run across Jot yet, i am still very new to modx
          There are just so many features, and i am still having a hard time figuring out what goes where when i unzip a folder
          I some how managed to totally blow up my contact page that comes by default with initial setup..lol
          I was attempting to upgrade my ditto... which reminds me, i still need to fix that...

          So i am trying to go slow with these things.
          I swear when i figure this stuff out, i am making a dummies guide to modx on my site
          I am great at writing tuts,...
          i just have to learn this stuff first so i can write it up in plain english for people like me that learn from doing not reading.

          Anyways...
          I will try to make the module to delete.. i am kinda afraid to just go jump in my database.
          I have too much stuff on the site.
          I will let you know how that worked out, and i will definitely go searching for this "Jot Dashboard"

          Again.. thank you so so very much!
            • 10
            • 16 Posts
            bunk58 , I made the mod and tried to run it and i got this....

            « MODx Parse Error »
            MODx encountered the following error while attempting to parse the requested resource:
            « Execution of a query to the database failed - Table ' x x x_mdx01.modx_jot_content' doesn't exist »
                  SQL: DELETE FROM `modx_jot_content` WHERE `published` = 0
                  [Copy SQL to ClipBoard]
             
            Parser timing
              MySQL: 	0.0010 s	(0 Requests)
              PHP: 	1218789721.2936 s	 
              Total: 	1218789721.2945 s



            if you can see what i did wrong based on that code output,
            i would love to learn how to fix it so i can mass delete

            If you can’t, I guess i will just have to and sit and delete this all by hand,
            take off all the comment tags and replace them with the jot string and then install Jot
            I did find that, not the dashboard yet, but jot 1.1.4, so that at least should help
            from what i am reading, once i figure this all out anyways.
            oh! and i did see a snippet in the "Resources ->Manage resources" that said "Jot - 1.1.2" but for the life of me,
            i can not find a place to moderate it in the admin tabs

            BobRay :
            from what i could tell, the comments attached to the pages are not in separate documents
            so there was no way to mass delete them with the doc manager, all it would do is delete the news pages

            Bleh.. I guess its time to put on some more coffee and dive back into all this code and stuff!

            Thanks so much for your time, its greatly appreciated!

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              jot is a snippet; at this point there is no Manager module for managing it. The jot_content table won’t exist until Jot has been used; if the table doesn’t exist on the first snippet call, it will create it.
                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
                • 10
                • 16 Posts
                Quote from: sottwell at Aug 15, 2008, 04:03 AM

                jot is a snippet; at this point there is no Manager module for managing it. The jot_content table won’t exist until Jot has been used; if the table doesn’t exist on the first snippet call, it will create it.

                Ahh ok.. well obviously the jot version i have on there has not been called yet or there would be content.. Soo....
                if it has nothing to do with the comments that are on there now, then do you know where i can locate them at, via a backend, so i can mass delete them since the front end only allows you to delete them one at a time, and i have a few thousand to delete...?
                  • 4310
                  • 2,310 Posts
                  Michelle, I assumed your comments were from Jot, but maybe they’re not.
                    • 10
                    • 16 Posts
                    Quote from: bunk58 at Aug 15, 2008, 04:13 AM

                    Michelle, I assumed your comments were from Jot, but maybe they’re not.

                    That’s ok... I went and searched through all of them, and there were only a few comments by close friends,
                    So i am just going to delete the pages, and republish them with no comment tags:

                    {{comments}}

                    until i figure out how to install jot
                    with so few comments that mean anything to me, its not worth sitting and deleting them all
                    my friends will just re post their tags to the pages once i have jot up and running.

                    But i have this thread bookmarked in case i ever have to mass delete once jot is installed
                    So this is definitely useful info for the future

                    Thanks!
                      • 4310
                      • 2,310 Posts
                      {{comments}}
                      That does use Jot, must be that your database tables have a prefix " x x x_mdx01".