We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29981
    • 7 Posts
    Dear All,

    Is there a way to disable the posting of comments in the blog-items? I would like to disable it for both non-registered as for registered users. Next to that I would like have the "comments (x)" message be removed in the blog-lines.

    Any help is very much appreciated!

    Tikkel
      • 26435
      • 1,193 Posts
      Do you still want the comments that were already posted to be viewable, or do you just want to get rid of the comments all together on certain pages?

      If you want to get rid of the comments all together on certain pages, just edit the page in the manager and remove the comments chunk. in the default MODx 0.9.5 installation, that comments chunk is {{Comments}}. Take that part out.

      If you want to display the comments that were already posted, but you want to disable further commenting, you would need to customize your [[Jot]] snippet call a bit to use placeholders such as this:
      [!Jot? &placeholders=`1` &output=`0`!]
      
      [+jot.html.comments+]
      [+jot.html.navigation+]
      


      The above code will only display the comments, but it will not provide a form to add comments.

      To remove the "comments (x)" in the blog lines, create a new chunk called myDittoTpl and put this in it:
      <div class="ditto_summary">
      	<div class="ditto_head">
          	<h3><a href="[~[+id+]~]">[+title+]</a></h3>
      	</div>
         <div class="ditto_content">
      		[+summary+]
      	</div>
      </div>
      

      then in your Ditto call make sure you have the parameter &tpl=`myDittoTpl`
      -sD-
      Dr. Scotty Delicious, Scientist.
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 29981
        • 7 Posts
        Dear Dr. Scotty Delicious,

        You are Fast!!

        In fact I have a clean Modx-intallation and I don’t want front-end users to add comments on any blog posts. Nor published or items being published in the future. Is that possible? I saw that by removing the {{Comments}} part I would remove the comment on a certain article, but I would like to have it removed upfront for all articles to be placed in the future.

        I this also possibe?

        Tikkel
          • 26435
          • 1,193 Posts
          It sounds like you are having your content publishers use the front end publishing wiht the [[NewsPublisher]] snippet. Is this correct?

          If it is, on the document that calls the NewsPublisher snippet, there is probably a parameter in there that looks something like this:
          &footertpl=`Comments`


          Remove that.

          -sD-
          Dr. Scotty Delicious, Scientist.
            Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
            All of the above... in no specific order.


            I send pointless little messages