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

    I hope you guys can help me out with my following queries: Please look at the second "edit" part of this post

    Site in question: http://www.fiery-legends.de (Click on news!)

    1. How do I find out if I have the latest DITTO version? SOLVED!
    2. Is there a way to implement a "comment-count" so that near where is says readmore it says: "Comments(X) read more" and x = amount of comments? SOLVED!
    3. Referring to 2. how do I implement the comment function in the single-news page? SOLVED!
    4. Where I have [+author+] it says "default admin account", even though I am admin can I change it to display "Counterfire" (myself)? If, then how? SOLVED!
    5. How do I change the "date" chunk so that I can add the word "at" -> "01-Apr-10 at 10:38" instead of "01-Apr-10 10:38" SOLVED!
    6. The placeholder [+summary+] doesn’t work? SOLVED!

    EDIT - NEED HELP PART 2 tongue

    Thanks everything works smiley

    Just have a couple more questions now:

    1. Instead of using your code for the comments I just added the default {{Comments}} chunk and it works fine! I was wondering though, how to change the templates for the form & comments? I was looking for the css or template and cannot find it :/ Does anyone know? Has anyone got any finished templates where for the form all you need to have is: to be registered & there is only one text-box for the comment?

    2. Has anyone developped code to show the latest 5-6 news’s in a chunk (for my Latest News box on the top-right)?I found something about this in the forums! WIP!

    3. How do I make it such that you can only post comments once you are logged in and the name is automatically defined by your username so that you do not have to enter a name/e-mail? And also, how do I remove the subject part entirely so that in the end all the user needs to do is enter text for a comment? I guess these answers will come off the answer to my first questions (1.)

    4. How do I manage "comments"? Delete, edit, etc?

    5. In the single news page where I have [+author+] and [+date+] it doesn’t work :s Here is my chunk code for the single news:


    <div id="nmultipletemplate">
    <div id="ntitlebg"><h5><a class="ntitle" href="[~[*id*]~]">[*pagetitle*]</a></h5>
    <span class="margin5l"><span class="grtext">Posted by <span class="wtext">[+author+]</span> on [+date+]</span></span></div>
    <div id="ncontent">
    <span class="justify"><span class="wtext">[*#content*]</span></span>
    <div id="nrm"><span class="margin5r"><span class="wtext"><span class="bold">([[Jot?&action=`count-comments`]] comments)&nbsp;&nbsp;</span></span></span></div>
    {{Comments}}
    </div>
    </div>


      • 16278
      • 928 Posts
      1) Look in the list of snippets under Elements > Manage Elements > Snippets. The version number will be given at the beginning of the comments alongside Ditto’s name (2.1.0 in MODx 1.0.3). It’s been at 2.1 for a long time now.

      2) Comments come with Jot rather than Ditto, so it’s a Jot call within your Ditto template chunk (see below)

      3) Again, this is Jot, and you need a Jot snippet call in the template you use for the single-news page.

      4) Set the name you want displayed in the Full Name field under the user’s record in Security > Manager Users

      5) You haven’t given us your actual Ditto call, but it needs to include &dateFormat=`%d-%b-%y at %h:%M` - what isn’t preceded by % is reproduced as it stands in the [+date+] placeholder.

      6) Your Ditto call must include &extenders=`summary` to print summaries or introtext in the [+summary+] placeholder.

      You may find the info on Ditto on Pogwatch useful. Here’s the tpl chunk I use for the Pogwatch blog (with comment count)
      <div class="blogItem">
      <h4>[+pagetitle+]</h4>
      <h5>[+pkDate:date=`%d %b %y`+] <span class="links">[+tagLinks+]</span></h5>
      <h3><a href="[+url+]">[+longtitle+]</a></h3>
      <div class="blog_intro">[+summary+]</div>
      <p class="more">([[Jot?action=`count-comments` &docid=`[+id+]`]] comments)  [+link+]</p>
      </div>

      and here’s the part of my blog post site template with the Jot calls:
      <div id="content">
      <h3 id="headline">[*longtitle*]</h3>
      [*#content*]
      <hr  class="clearer"/>
      [[Jot? &subscribe=`0` &pagination=`20` &sortby=`createdon:a` &numdir=`0` &placeholders=`1` &output=`0` &canmoderate=`<groupname>` &captcha=`1` &validate=`name:Name is required,content:You have not entered any comment!` &notify=`2` &badwords=`{{blogBadwordList}}` &bw=`1`]]
      <div id="blogComment">
      <h4 id="blogCommentTop">Comments ([[Jot?&action=`count-comments`]])</h4>
      [+jot.html.comments+]
      [+jot.html.form+]
      </div>
      

      laugh KP
        • 5854
        • 39 Posts
        Look at edit2 @ first post.
          • 16278
          • 928 Posts
          It’s easier to help if you keep to the usual practice if putting new subject matter in a "reply" post, rather than edit the original (people who’ve replied or subscribed to the topic get an email alert for new posts only, for one thing).

          5. In the single news page where I have [+author+] and [+date+] it doesn’t work :s Here is my chunk code for the single news:

          The single-news page is a resource like any other in MODx, and has no idea that Ditto even exists. The placeholders [+date+] and [+author+] are created by Ditto and are expanded in the tpl chunk named in your Ditto call. But in the single-news page, you need to use a snippet call to get information relating to the page, since Ditto has done no work on the page to generate content for the placeholders. There’s a snippet in the Extras called Author Timestamp that will fetch the data you want and format it, though it looks a bit long in the tooth (references to etomite - was ist das?). I’m sure there are others like it as well.

          Most of your questions refer to Jot rather than Ditto (Jot does have a sub-forum of its own).
          1. Instead of using your code for the comments I just added the default {{Comments}} chunk and it works fine! I was wondering though, how to change the templates for the form & comments? I was looking for the css or template and cannot find it :/
          Try the various files in snippets/jot/templates folder. Beware: Jot makes extensive use of PHx, which is another kink on the MODx learning curve (but well worth some study).
          smiley KP