1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Get Avatar URL

Discussion in 'XenForo Questions and Support' started by ibaker, Feb 12, 2012.

  1. ibaker

    ibaker Well-Known Member

    I have a script that requires the getting of some user info and the only one I can't seem to get right is the user's avatar.

    This is the script I need to complete the variables
    Code:
    <script type="text/javascript">
    var _SKYAUTH = {
    loginUrl:'REPLACE WITH FULL LOGIN URL',
    memberNick:'REPLACE WITH CONTEXT CODE TO GET MEMBER USER NAME',
    memberId:'REPLACE WITH CONTEXT CODE TO GET MEMBER ID',
    profileUrl:'REPLACE WITH MEMBER PROFILE URL',
    photoUrl:'REPLACE WITH MEMBER PHOTO URL'
    };
    </script>
    Here is what I have so far which works except for the avatar:
    Code:
    <script type="text/javascript">
    var _SKYAUTH = {
    loginUrl:'http://localhost/login/',
    memberNick:'{$visitor.username}',
    memberId:'{$visitor.user_id}',
    profileUrl:'{xen:link members, $user}',
    photoUrl:'REPLACE WITH MEMBER PHOTO URL'
    };
    </script>
    Can anyone help with what I need to put in there for the avatar?
     
  2. steel_curtain

    steel_curtain Well-Known Member

    Try this.

    Code:
    '{xen:helper avatar, {$user}, m}'
     
  3. ibaker

    ibaker Well-Known Member

    Thanks Steel, but it is just showing the default Question Mark Avatar with that
     
  4. steel_curtain

    steel_curtain Well-Known Member

    Ok... last try.

    Code:
    '{xen:helper avatar, $visitor, l}'
     
    ibaker likes this.
  5. ibaker

    ibaker Well-Known Member

    YAY...that worked...thanks Steel Curtain!
     

Share This Page