We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33033
    • 43 Posts
    Just started using Jot this week and loving it so far. I can’t wait for the forum mode to come along. I do have a few questions though.

    I’m hoping to pull some info from the users profile and display it in the comments. I would like to display the users country flag and user comment, and hopefully their join date and number of comments made (not sure if those 2 can be done). For flag and comment, would PHx be the best bet for this? I haven’t used it yet but seems like it would be a good choice for this. In the comments chunk would something like this work (assuming the fields are the correct ones and it’s possible for postcount/join date.)?

    	
    <div class='flag'>
    <img src='[(site_url)]images/flags/[+phx:userinfo=`country`+].gif' alt='Country' />
    </div>
    
    <div class='signature'>
    [+phx:userinfo=`comment`+]
    </div>
    
    <div class='footer'>
    [+phx:userinfo=`postcount`+] Posts since [+phx:userinfo=`joindate`+]
    </div>
    


    Also, for sorting comments, you are working on that for the next update correct? It would be nice to be able to sort from the call to have the oldest comments on top instead of the newest.

    Thanks.



    EDIT: Just realized this is my first post shocked
      • 4195
      • 398 Posts
      if you use [+phx:userinfo=`fieldname`+] you are getting the information for the current user (who is viewing page). If you want to take the userinfo from the comment author you’d have to use: [+comment.createdby:userinfo=`fieldname`+].

      Post count for the user isn’t available yet from Jot but will be in next release.
      If you can’t wait for that you can create a custom snippet (or custom modifier for phx) to get the user postcount from the jot table.
        Armand Pondman
        MODx Coding Team
        :: Jot :: PHx
        • 33033
        • 43 Posts
        Thanks much! It worked perfectly.