We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5282
    • 147 Posts
    Hi !
    on the developers’ blog, when users post a comment, their smf forum avatar is displayed
    http://modxcms.com/google-tisp.html#comments
    how can i do this on my site ??
    ( i searched the doc didn’t find anything )

    by the way is it also possible to access to other smf account variables ?

    thanks
      i’m not a native english speaker, sorry if there are any mistakes ! smiley

      Pikkitux.com Website about Ubuntu Linux, Website Creation, and many other how-tos, tips and tricks ... ( French Language, and of course Modx Powered ! )
      • 7923
      • 4,213 Posts
      MODx site blog doesn’t use Jot, it uses modified UserComments snippet.. see here for the snippets.

      It would be great if you could do the support for Jot and post results here.

      EDIT:

      This should get you started, do a snippet that does:
      $forumPath = 'forums/';
      $forumUrl = $modx->config['site_url'].$forumPath;
      
      include_once($forumPath.'SSI.php');
      $name = $context['user']['name'];
      $avatar = $context['user']['avatar']['image'];
      $fid = $context['user']['id'];
      $fprofile = $forumUrl.'index.php?action=profile;u='.$fid;
      
      return 'name: '.$name.' avatar: '.$avatar.' fid: '.$fid.' fprofile: '.$fprofile;
      


      Modify that to output what you want and save the information to custom fields in Jot. You don’t have to modify Jot itself in anyway..

      EDIT 2:

      You also need the $context[’user’][’is_logged’] variable.. (to allow commenting only if user is logged in, wrap Jot call in another snippet that checks this for example)


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 16194
        • 103 Posts
        Did someone try this out? I would love to see jot using the smf users!
          Impossible is nothing - with ModX