We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4463
    • 26 Posts
    I’d like to allow the world (not logged in and not signed in people) to post comments and,
    and as the site’s manager publishing them after aproval, is that possible??

      • 25663 MODX Staff
      • 12,272 Posts
      Not at this time.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4463
        • 26 Posts
        I’ll take a look at the comments snippet and try to understand if I can alter it to function as I want, maybe adding a field to the comments table (I don’t know if that exists, I’m just supposing) with the default value "0", meaning it’s not approved, and try to find some way the administrator can alter that value to "1" and call the comments snippet to display only the approved comments ( the ones with "1"). Maybe this is not as simple as it seems, it’s just an idea, it may be a stupid one but sorry I’m a newbie in Mod-X wink

        Anyone with other ideas on how to do this... please help!!

        Thanks in advance
          • 25663 MODX Staff
          • 12,272 Posts
          Comments are stored in the [*content *] area of a regular page, delineated by a special divider and with some extra header information. This could be a pretty cool implementation if we can get this to work. Please have a go at it!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 4463
            • 26 Posts
            Quote from: rthrash at Feb 24, 2006, 12:09 PM

            Comments are stored in the [*content *] area of a regular page, delineated by a special divider and with some extra header information. This could be a pretty cool implementation if we can get this to work. Please have a go at it!

            Thanks, i’ll study the documentation and try to do something
              • 32241
              • 1,495 Posts
              Cool,

              glad to have a programmer interested in improving our current snippets.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 4041
                • 788 Posts
                Although I have not yet had a chance to try ModX, I looked at the snippet code for the comments and perhaps some parts of a user comments snippet I have would work to achieve the results you are seeking. I am not at all familiar with how ModX works but looking at the snippet code in the install folder, the following should work...

                The simplest way would be to add a setting, for example name it $autopublish. Then have it set to either yes or no. Then add an if/else statement to the part of the code that creates the document. If it is set to yes, set the publish variable to 1, if it is set to no then make the publish setting to 0. If it set to no, then I also added the option to send the admin an internal mail to notify them that there is a new entry that needs validation before publishing.

                I have attached the user_comments code and it is documented so you can see what it all does and grab the parts you need...

                  xforum
                  http://frsbuilders.net (under construction) forum for evolution
                  • 18397
                  • 3,250 Posts
                  Breezer! Welcome! smiley
                    • 4041
                    • 788 Posts
                    Thanks Mark, I was impressed with the demo and figured I’d try out ModX...
                      xforum
                      http://frsbuilders.net (under construction) forum for evolution
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      The block for a new comment would have to be flagged, and the manager would have to scan the whole page to find, then examine the flagged block, then change the flag to "approved". The comment parser would then have to check that flag and skip the block if the flag were not set to "approved".

                      Or..have a page that the manager has to log in to, with a variation on the snippet that opens the comments document but only displays the new comment blocks? With QuickEdit enabled for the page (maybe a separate template for this?), it would be the work of an instant to remove bad comments entirely or edit the flag to approve it.

                      I’m wondering what would happen if an article generated hundreds or thousands of comments? Does the snippet have some kind of limit built-in to automatically close commenting after a certain number?
                        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