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

Smaller Avatars

Spenser

Active member
#1
Is it possible without changing too much to make the avatar area left of the posting text smaller (including the avatar)?
 

Brogan

XenForo moderator
Staff member
#4
message_user_info is the template you need to edit - change <xen:avatar user="$user" size="m" /> to <xen:avatar user="$user" size="s" />

The CSS is in the message_user_info.css template.
 

CyclingTribe

Well-known member
#6

Brogan

XenForo moderator
Staff member
#7
One member asked for all of their posts to be removed and unfortunately it has affected a lot of threads.

This is a cut and paste from one of the posts.

I've read several avatar-size threads now and the answer to changing their size is always, there is no way to do that without code and template edits. Well, I'm game - how do I do that with code and template edits? :) I'd like the avatars to be a full 124x124 and I'll just eliminate the padding.
Make sure the one php file you are about to edit, you have a back-up of, :)

If you open this php file: yourinstalldirectory/library/XenForo/Model/Avatar.php you will find this located near the top:

PHP:
    protected static $_sizes = array(
        'l' => 192,
        'm' => 96,
        's' => 48
    );
the "l" contains the value for the large avatar, "m" for the medium (used in the poster block), and "s" for small avatars. Change the 96 to 124, and save.

Template edits: AdminCP -> Appearance -> Templates. Select your style you want to apply the changes to.

Open xenforo.css, find:

Code:
.avatar .img.m { width: 96px;  height: 96px;  }
Change both 96px's to 124px

Save, and then open navigation.css:

Code:
    #AccountMenu .menuHeader .links .fl
    {
        position: absolute;
        bottom: 10px;
        left: {xen:calc '10 + 10 + 96'}px;
    }
change the 96 to 124, and select save.

You will need to fine tune paddings for the poster information block. You will need to re-upload your avatar so the new "m" size can be saved. Also, the three default avatars should have their medium size changed to 124px too.
 
#8
You have to still go through all of that to just increase the avatar size? Is there a setting in the admin panel for this now?

Greg