We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Jot uses its own mini-templates for the form, the moderation block, and for the output. You can find the default tpls it uses in the assets/snippets/jot/templates directory.

    The best way to customize these is to copy the one you want into a new chunk, then tell Jot to use the chunk for its tpl. Nothing should change at this point. Then modify the chunk one item at a time, checking to make sure it’s working as you intend with each modification. These tpls are a little tricky, as they use a lot of phx conditionals to control the output.

    You’ll want the chunk.comment.inc.html file copied into your chunk, then you’ll want to modify this part
                 <span class="jot-subject">[+comment.title:limit:esc+]</span><br />
                 <span class="jot-poster"><b>Reply #[+comment.postnumber+] on :</b> [+comment.createdon:date=`%a %B %d, %Y, %H:%M:%S`+]</span>
                 <hr />
                 <div class="jot-message">[+comment.content:wordwrap:esc:nl2br+]</div>
                 <div class="jot-extra">
                 [+comment.editedon:isnt=`0`:then=`
                  <span class="jot-editby">Last Edit: [+comment.editedon:date=`%B %d, %Y, %H:%M:%S`+] by [+comment.editedby:userinfo=`username`:ifempty=` * `+]</span>
                   `+] [+jot.moderation.enabled:is=`1`:then=`<a target="_blank" href="http://www.ripe.net/perl/whois?searchtext=[+comment.secip+]">[+comment.secip+]</a>`+]</div>
    

    For example, you would want
    <h1 class="jot-subject">[+comment.title:limit:esc+]</h1>

    Each post is already enclosed in <div> tags with plenty of classname attributes for styling:
        <div class="jot-row [+chunk.rowclass+] [+comment.published:is=`0`:then=`jot-row-up`+]">
         <div class="jot-comment">
    

      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
      • 13388
      • 33 Posts
      Hello,

      I am a little confused by this tutorial despite it being quite outdated. I realize MODx isn’t a blogging platform by any means, but the functionality presented by this tutorial is enough to pass for my client, so I’d like to use it and avoid WordPress if at all possible.

      With the exception of the INPUT_BLOG creation process (as Newspublisher is no longer needed), I’ve done all the steps, but simply can’t figure out where the blog comment form is supposed to come into play? Isn’t that the purpose of Jot, to add comments functionality to any document?

      -- Edit:
      Well, I can add
      [[Jot? &subscribe=`0` &pagination=`10`]]
      on each and every document by hand and that includes the comment form, but it includes it in the ditto call, doesn’t seem to actually save the comment and it wouldn’t make sense to have to copy this chunk over and over unless I use a special blog template (an actual Template and not a "tpl").

      Any ideas?
        • 29019 ☆ A M B ☆
        • 104 Posts
        I would definitely recommend making a separate template for your blog articles. It shouldn’t add too much complexity, and if you ever decide to add more features to blog articles it’ll be a lot easier if they are all in a separate template. Also if you decide to change the way you use Jot (lets say you decide you’d like to monitor comments), you’d only have to change it in one place, rather than going through every blog article and changing your Jot call.
          www.darkstardesign.com

          Are you in the Nashville area? Join us for our next MODX meetup!