We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42146
    • 73 Posts
    I cant seem to figure out how this is done.... but should be easy, but i cant figure it out and not finding anything in my searching.

    I'm wanting to view a members profile, other than the logged in user. using login profile

    Member Profile page id=47 page code
    [[!Profile? &user=`userID` &prefix=`user.`]]
     
    <p>Username: [[+user.username]]</p>
    <p>Email: [[+user.email]]</p>


    on a different page, i want to have a link to view a members profile via a link.
    <a href="index.php?id=47&userID=[[+pm.sender.profile.id]]">[[+pm.sender.username]]</a>


    After way to long trying to figure it out, i'm sure one of you know how to do this...

    This question has been answered by sottwell. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The placeholder values are only available after the Profile snippet has been run.

      http://rtfm.modx.com/display/ADDON/Login.Profile

      What exactly do you want to do? Just have a link for one user, or have a list of links for multiple users?
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You might want to consider this extra http://rtfm.modx.com/display/ADDON/Peoples
          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
          • 42146
          • 73 Posts
          What i'm wanting to do is in my personalmessage extra read message resourse , to have following code
          <h1> Message </h1>
          [[!pmRead]] 
          <div class="PmSender">From: <a href="index.php?id=47&userID=[[+pm.sender.profile.id]]">[[+pm.sender.username]]</a></div>
          <div class="PmRecipient">To: <a href="index.php?id=47&userID=[[+pm.recipient]]">[[+pm.recipient.username]]</a></div>
          <div class="PmSubject">Subject: [[+pm.subject]]</div>
          <div class="PmMessage">Message: [[+pm.message]]</div>


          where resource id 47 is the member profile page. current code for this page is
          [[!Profile?
          &user=`[[getReqParam? name=`userID`]]`    
          <!-- what is there now.... no idea what this needs to be or if i should be using peoples instead... if i hard coded &user=`3` or what ever id, it displays the user info. but i guess how do i make this variable based on the what is getting passed by the url? -->
          &useExtended=`1`
           ]]
           
          <div class="row">
          
                  <div id="Basic_info" class="six columns">
              <h2>BASIC INFORMATION</h2>
              <p>Username: [[+username]]</p>
              <p>Full Name: [[+fullname]]</p>
              <p>Email: [[+email]]</p>
              <p>Phone: [[+phone]]</p>
              <p>City: [[+city]]</p>
              <p>State: [[+state]]</p>
              <p>Zip: [[+zip]]</p>
              <p>Country: [[+country]]</p>
              <p>Gender: [[+sex]]</p>
              <p>Nationality: [[+nationality]]</p>
              <p>Sexual Orientation: [[+sexort]]</p>
              <p>DOB: [[+dob:date=`%d-%m-%Y`]]</p>
          ect....... ( lots of extended user info
          </div>
          </div>
          so that when a user gets a message from another user, their username will be a url to click on to display the sending users profile information and the receipient to know who is sending them a message....

          i'll also have another page that will list users with a link to see their full profiles as well... searching members by extended field data and more... so being able to pull up one particular users profile dynamically is critical

          i have the people addon installed and working. with a page using the modified version of the PeopleGroup currently just displays all members and their full profiles of the wanted user group. not sure if instead of the login.profile, should be one of the peoples snippets.. perhaps thats the issue....??? though i didn't see a way to specify a specific user ID to display, though the profile snippet lets me do that, just how do i pass that id along in the url.

          I know i do that with the personal messages snippets... http://modx.com/extras/package/personalmessages on step 3 but i think that the snippet was made to accept the recipient param-name id took me a while to figure how to pass the id via url there....
          example "/send/?recipient=15", where 15 -  user identifier.
          since example used FURLS and i dont have that on yet. so the ? had to be a & [ed. note: jstump last edited this post 13 years, 10 months ago.]
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Again, on the page that is showing the message, in order to use the pm. placeholders the Profile snippet must be run first, to provide the values for those placeholders.

            Does the incoming message provide the username or ID of the sender? If it does not, there is no way to call Profile (or anything else, for that matter) to get that information.
              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
              • 42146
              • 73 Posts
              [[+pm.sender.profile.id]] is from the private message snippet placeholders , which is the id of the sender, which does pass the right id in the url. it's getting the [[!Profile?
              &user=`USerID_passed by url` to accept the value.
              • discuss.answer
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Ah, sorry - I see that pm can be for private message as well as something to do with profile management!

                Have you tried having the inner getReqParam snippet uncached? Having its value cached might be your problem.
                  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
                  • 42146
                  • 73 Posts
                  i have no idea why i didn't try it uncached. that seemed to have fixed the issue. Thanks so much, yet again you have solved my issues smiley now on to profile images without use of gravatar.