I'm currently redesigning our forum template but I've found that there's no way to resize avatars. There's a variable that calls avatars but won't let me resize them.
Within my theme I have a special design for the first post in order to have more space for it. Currently the first topic doesn't have any avatars because they were a bit too big. I still want to have them but there's no way to call avatars without touching phpBB code outside themes.
So I'm wondering if this is something you would consider if a RFC is made?
Resizing avatars
Resizing avatars
Slightly better English than it was in 2005, still improving
Re: Resizing avatars
This is a great idea for an extension. Dunno about a core feature... A core feature like this is not that bad, actually. I Just don't know if it is good enough.
Re: Resizing avatars
Quite a good suggestion. I think it would be good to do it the way it is done by Gravatar.
The parameter s to denote the size of the avatar. Something like that would be good right?
Code: Select all
http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200
Re: Resizing avatars
Wow, that works really great. Tried a lot of sizes and and still works, very
Now, the thing is most phpBB forums do not force users to have simmetrical avatars (100x100px, 150x150px etc). I'm not sure if this can be done without hug changes. Maybe using something like this?
Although, just getting the avatar route would be enough for me. I just need to resize them, and I could do it just with the file route.
Edit: That gravatar implementation sounds great for uploaded images too.
Now, the thing is most phpBB forums do not force users to have simmetrical avatars (100x100px, 150x150px etc). I'm not sure if this can be done without hug changes. Maybe using something like this?
Code: Select all
<!-- DEFINE $AVATAR_HEIGH = 100 -->
<!-- DEFINE $AVATAR_WIDTH = 100 -->
Edit: That gravatar implementation sounds great for uploaded images too.
Slightly better English than it was in 2005, still improving
Re: Resizing avatars
You can do it via css. Add class to avatar container, like class="avatar", then in css add
Code: Select all
.avatar img { max-width: 100px; max-height: 100px; }
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: Resizing avatars
Quick and simple Way to go Arty
Re: Resizing avatars
But that only solves the showing part. If it is a 1000x1000 image, the users will still download that huge image.AliasM2K wrote:Quick and simple Way to go Arty
Re: Resizing avatars
Just tried that, doesn't work. It should but there's a problem, {postrow.POSTER_AVATAR} returns something like this:Arty wrote:You can do it via css. Add class to avatar container, like class="avatar", then in css addCode: Select all
.avatar img { max-width: 100px; max-height: 100px; }
Since the avatar sizes are inline I can't really alter it via CSS. Same happens with {postrow.POST_AUTHOR_FULL} styling.
Slightly better English than it was in 2005, still improving
Re: Resizing avatars
Did you add a class in CSS and declared it in HTML?ecwpa wrote:Just tried that, doesn't work. It should but there's a problem, {postrow.POSTER_AVATAR} returns something like this:
I tested and it works perfectly.ecwpa wrote:Since the avatar sizes are inline I can't really alter it via CSS. Same happens with {postrow.POST_AUTHOR_FULL} styling.
Re: Resizing avatars
Yes, there was a class called. avatar already declared so I just added what artsy suggested. I'll check again if I did something wrong.
Slightly better English than it was in 2005, still improving