We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19153
    • 53 Posts
    I have a site where users can upload their own profile photos and save them to the modx user db, the photo can then be accessed with [+photo]

    However I want that photo to be displayed in quip when they comment

    I've just had a play with this but can't get it to work. Any reason that quip is not setup to display a logged in users [+photo] rather than a gravatar?
      • 19369
      • 1,098 Posts
        • 22019
        • 390 Posts
        ie this:
        [[+modx.user.id:userinfo=`photo`]]


        Depending on how you've added a photo to the user profile.
          Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
          • 19153
          • 53 Posts
          yes that works great to display the logged in users photo.

          However thats not storing the photo in the quip comment and therefore other users will not see the photo.

          Perhaps if i passed that information using a hidden field when the user comments somehow?
            • 19153
            • 53 Posts
            Ok i got it to work I think but its a bit of a hack, i thought something like this would have been a basic feature with quip.

            Because quip doesn't have the ability to create extended fields i have used the website (as I'm not using it) field to store the location of users image in the quip db table.

            So when the users posts it passes the hidden value:

            <input type="hidden" name="website" id="quip-comment-website-[[+idprefix]]" value="[[+modx.user.id:userinfo=`photo`]]" />


            And to display the photo in the quip comment I can just use the supplied website placeholder with phpthumb to resize it

            <img src="[[+website:phpthumbof=`w=50&h=50&zc=1`]]" class="quip-avatar" alt="" />


            This works which is great, although it doesn't seem the best to be using the website field to store the data....

            ....the only problem now though is if the user changes their photo. This will not be reflected in older comments, generally on a website or forum your image would change across the whole site to the current image....any thoughts?
              • 42146
              • 73 Posts
              how did you go about getting a web user to be able to upload a photo? a link to any documentation would be awesome! my particular instance is with the extra login.profiles