We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8881
    • 73 Posts
    Ok so now I can publish news.. Now the only thing that isn’t working is the comments.

    Check it out http://bleach.endless-4um.com/index.php
      • 26435
      • 1,193 Posts
      In my manager, under Resources -> Chunks, I have a chunk called "Comments". In fact, it is a default chunk, installed with the default 0.9.5 installation if you chose to install the example content.

      If you have that, just put {{Comments}} at the end the content for each document you want comments on.

      If you do not have the Comments Chunk, Make an new chunk called Comments and put this in the code area:
      <div id="commentsAnchor">
      [!Jot? &customfields=`name,email` &subscribe=`1` &canmoderate=`Site Admins` &placeholders=`1` &output=`0` &guestname=`An anonymous visitor` &subscribe=`1` &notify=`2` &subjectSubscribe=`A blog you are moderating at scottydelicious.com has been updated`!]
      <a id="pageComments"></a>
      [+jot.html.subscribe+]
      [+jot.html.comments+]
      <a id="pageCommentsForm"></a>
      [+jot.html.form+]
      [+jot.html.moderate+]
      [+jot.html.navigation+]
      </div>
      


      -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
        • 8881
        • 73 Posts
        ok that seems to work but when I was testing the comments out this is what i got

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’’ at line 1 »
        SQL: UPDATE `endless_bleachtest`.jot_content SET title=’fghfgh’,content=’gfhdfghdfghdf’,createdon=’1167791739’,createdby=’1’,secip=’24.12.12.10’,sechash=’e17993f986c6d7ce58e1113d40104df8’,uparent=’13’,tagid=’’,published=’1’ WHERE id=;
        [Copy SQL to ClipBoard]

        Parser timing
        MySQL: 0.0016 s (7 Requests)
        PHP: 0.0370 s
        Total: 0.0387 s
          • 22303 MODX Staff
          • 10,725 Posts
          Get the latest Jot from the add-on repository; there was an issue with the version included with the 0.9.5 distribution.
            • 8881
            • 73 Posts
            Ok that worked!! smiley

            But I want to disable guests from posting comments. The current code I have is

            [[Ditto? &tpl=`dittoTpl` &startID=`1` &summarize=`5` &dateFormat=`%B %d, %Y`]]

            What do I need to add so only registered users can post comments?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Everything you ever wanted to know about Jot:

              http://wiki.modxcms.com/index.php/Jot

              In this case, you want
              &canpost=`webgroup`
                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
                • 8881
                • 73 Posts
                Ok so I went to Security > Web Permissions

                and created a group called "Registered" So now in my code I put
                [[Ditto? &tpl=`dittoTpl` &startID=`1` &canpost=`Registered` &summarize=`5` &dateFormat=`%B %d, %Y`]]

                It still allows guests to post comments..

                Also another question how can the default user group be set to Registered. So if any random person signs up they get put in the Registered user group.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Ditto is for displaying the news items, Jot is for the comments. You need to put that in your Jot call, not your Ditto call.
                    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
                    • 8881
                    • 73 Posts
                    Ok so if I put &canpost=`webgroup` Exactly the way it is.. Only registered users can post comments right?

                    http://bleach.endless-4um.com/index.php

                    Also why is the comment form being shown in the index page in one of the articles? I don’t want that to be shown until they click on the comments link.. It is only doing this for the recent article..