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

Default Avatar

Discussion in 'XenForo Development Discussions' started by Mitchell996, Aug 3, 2013.

  1. Mitchell996

    Mitchell996 Member

    I need to set a default avatar for xenforo using the username of the member

    All I want to know is how to set the default avatar of all users to something like:

    mysite.com/avatars/forum_username.png
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Are you trying to change the file name of how the software saves a users avatar? Or do you quiet literally want to change the path to always be /avatars/forum_username.png?
     
    Mitchell996 likes this.
  3. Mitchell996

    Mitchell996 Member

    I want to change how the software saves a user avatar by default. So it's a dynamic one with their username in the filepath.
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    This will require an add-on that basically duplicates the upload avatar process, you should look at how XenForo uploads avatars. There's also 3 different sizes (s(mall), m(edium), and l(arge)) that need saved.
     
  5. Mitchell996

    Mitchell996 Member

    How can I hook it up to run this on registration?
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    To run on registration? Extend the registration controllers save (or register) action.
     

Share This Page