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

Where are user Avatars stored/referenced?

Discussion in 'XenForo Development Discussions' started by Phases, Oct 13, 2010.

  1. Phases

    Phases Active Member

    For the life of me I can't find how to pull the location of Avatars for users. I was expecting when I pulled xf_user to be able to get it from there, but I just see dimensions and date.

    (which I can't make much sense of (the date), much like the post_date in xf_thread..)

    Basically I'm querying some user info and wanted to attach their avatar to it.

    Thanks for any insight.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    They are stored in 3 places (small, medium, large):
    data/avatars/s
    data/avatars/m
    data/avatars/l

    For example, your avatar in the message template is data/avatars/m/2/2166.jpg?1285006902

    I'm just looking in the tables now to see if it's referenced there.
     
    Phases likes this.
  3. Phases

    Phases Active Member

    Oh nice, that helps. If you find it in a table hook me up, but I think I can work with that. Much appreciated.

    Edit: Nicer, 3 different sizes to choose from!
     
  4. Phases

    Phases Active Member

  5. Kier

    Kier XenForo Developer Staff Member

    Use
    HTML:
    <xen:avatar user="$user" size="m" />
    or
    HTML:
    <img src="{xen:helper avatar, $user, m}" />
    The code that runs these can be found in XenForo_Template_Helper_Core
     
    CyberAP, Brentnauer and Forsaken like this.

Share This Page