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

XF 1.5 Remove Avatars

Discussion in 'Styling and Customization Questions' started by MagicalMidge, Sep 15, 2016.

  1. MagicalMidge

    MagicalMidge Member

    So over the last few days I have been trying to figure out a way to implement user group avatars, whereby (we, as the forum administrators) decide what avatar picture a user has based on there usergroup

    ie: If we had a usergroup Android Dev, they would get the android avatar, we just believe it looks cleaner than allowing people to upload there own.

    Anyway, the reason for my post is if you look at the picture attached below it shows we have been able to figure a way of a custom picture depending on what usergroup the user is in, however we still have the un populated avatar to deal with.

    I am 99% sure it will be possible to remove this through styling, or even remove the component itself (removing the component may not be wise/ doable as xenforo may depend on it in some instances)

    I just am not familiar enough with xenforo to know exactly where all of the styling options are when it comes to the avatar pictures.

    Now our solution only works for threads, this wont show anywhere else, like the users profile page, or the dialogue box that pops up when you click a users username.

    So I really need help/ advice on how to style out all of the avatar elements that could possibly show, so it doesnt show that were using a workaround :p

    Any help is appreciated

    Attached Files:

  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is no simple way of removing the default avatars and replacing them with alternatives in all templates where the avatar is displayed.

    You will need to edit each template to do so.

    This guide should help you with that: https://xenforo.com/community/resources/how-to.4390/

    Alternatively, a custom add-on may be a better solution.
  3. MagicalMidge

    MagicalMidge Member

    Okay :) From the picture attached, you can see I have already got my "place holder" avatar picture in place, all I really need to do is change that picture for one I actually want to appear for that particular user group, so that part is fine.

    So I am not really looking to replace the old avatar image, just remove it from view.

    Do you know a list of each template that contain information regarding the avatar?

    Would it just be all templates with "avatar" in the name? So account_avatar | account_avatar_overlay | account_avatar_overlay.css | ad_member_view_below_avatar | news_feed_item_user_avatar_change?
  4. Chris D

    Chris D XenForo Developer Staff Member

    Use the Search Templates feature to search for xen:avatar

    This will find usages of both "{xen:avatar" and "<xen:avatar" which are both variants of the code we use to display a user's avatar.

    Specifically, the area in the screenshot is in the message_user_info template, but you'll find that we display the avatar in a lot of places aside from that.
  5. MagicalMidge

    MagicalMidge Member

    Honestly you guys have been absolutely amazing I cannot explain how much you have helped, in a speedy manner too!

    Great team, great community and even when I feel like I am pestering you, you come back with a professional, useful answer.

    Thanks again guys :)

    Chris D likes this.

Share This Page