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

XF 1.1 Change Default Avatar

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

  1. PetSue

    PetSue Member

    We have males only on our forum so we don't need the unknown/male/female avatars.

    I've made up a new one we would like to use for everyone that hasn't added their own in the 3 sizes & have added them to the Avatar directory.

    My question is - am I able to turn off the unknown/male/female avatar & just use the one I've added and if so how?

    Thank you :)
  2. steel_curtain

    steel_curtain Well-Known Member

    You can simply overwrite or rename the 3 sizes for the male avatar in the /styles/default/xenforo/avatars directory. That'll then display them for all users who haven't yet uploaded an avatar. You could do the same for the others in case someone doesn't choose male for their gender to ensure consistency.
  3. PetSue

    PetSue Member

    Thank you very much mate makes total sense will give it a go ta :)
  4. PetSue

    PetSue Member

    Worked a treat thank you very much steel_curtain :)
  5. taylor_smith

    taylor_smith Well-Known Member

    Hi! I've followed these instructions and overwritten the default avatar with a new image, not only in default but in all theme avatar folders, but the old images are still showing. Do I need to rebuild a cache? Re-upload themes? Could this be related to CloudFlare's caching of static content?
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes. If you have confirmed the new images exist at the correct locations, and if you have cleared your browser cache, then it could very well be caching on the server side of things.
    taylor_smith likes this.
  7. taylor_smith

    taylor_smith Well-Known Member

    Yep, that's what it was. Ty. :)
  8. Moddis

    Moddis Active Member

    Is there a way to change the default set of avatars besides just overwriting them in the xenforo/avatars folder? Just dont want to do this each upgrade sou would like to chnage the default avatar directory to "styles/default/custom/avatars" instead of "styles/default/xenforo/avatars".

    Can't seem to find it anywhere is the templates except for in "help_bb_codes" template where is shows:
    <xen:set var="$bbCodeExampleHtml">[IMG]{xen:helper fullUrl, '&#8203;@imagePath&#8203;/xenforo/avatars/avatar_s.png', 1}[/IMG]</xen:set>
    <xen:set var="$bbCodeEval">[IMG]{xen:helper fullUrl, '@imagePath/xenforo/avatars/avatar_s.png', 1}[/IMG]</xen:set>
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Style Properties -> General -> Path to Images
  10. Moddis

    Moddis Active Member

    That woudn't really work well because of what I mentioned here(btw, love the insert quote):

    So I went back to use the default image location so that I don't have to update the xenForo folder with new image after certain upgrades. Now I just keep custom images in here "styles/default/mystyle". Lol, was the older way the better way to go?


    Now that I think about it, it's probably is better to have a default image location folder set as "styles/customstyle" and just copy the xenforo image folder into that. That way you can at least control which image to copy to the default folder instead of it automatically overwriting something important with an upgrade.
    Last edited: Feb 8, 2014

Share This Page