Page 2 of 5
Re: Avatar on index
Posted: 01 Apr 2010, 23:49
by Fire-Fox
I did replace the "xx" with your width and height
Re: Avatar on index
Posted: 05 Apr 2010, 17:23
by Makis
Not working this way, I still get the avatar in its full size.
I tried also min width and hight by %
Thanks a lot anyway.
Re: Avatar on index
Posted: 05 Apr 2010, 18:19
by Fire-Fox
refresh your template?
Re: Avatar on index
Posted: 05 Apr 2010, 18:34
by Makis
I ALWAYS do
Re: Avatar on index
Posted: 05 Apr 2010, 18:53
by Stoker
Fire-Fox, please post a demo where you have this working.
Re: Avatar on index
Posted: 05 Apr 2010, 18:55
by Makis
Maybe we must change something inside this code in “index.php”
Code: Select all
'USER_AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
I think Stoker knows
Re: Avatar on index
Posted: 05 Apr 2010, 22:13
by Fire-Fox
Don't think so, that part is controlled from ACP where you define your width/height on all avatar. if thats what you are aften, then yes you change it from the ACP
General -> Board Configuration -> Avatar Settings
@Stoker
I don't have any demo it was just my logical thinking that said to me it should be so, and i know now it don't work...
Re: Avatar on index
Posted: 06 Apr 2010, 00:07
by Stoker
Fire-Fox, that has absolutely nothing to do with anything in this topic.
Incorrect help is
not better than no help.
Please make sure you know what you are talking about before writing!
Makis wrote:Maybe we must change something inside this code in “index.php”
Code: Select all
'USER_AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
I think Stoker knows
You are absolutely right. Try this code instead:
Code: Select all
'USER_AVATAR' => ($user->data['user_avatar']) ? get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], ($user->data['user_avatar_width'] > $user->data['user_avatar_height']) ? 50 : (50 / $user->data['user_avatar_height']) * $user->data['user_avatar_width'], ($user->data['user_avatar_height'] > $user->data['user_avatar_width']) ? 50 : (50 / $user->data['user_avatar_width']) * $user->data['user_avatar_height']) : '',
Change the number 50 to something else if you prefer.
Re: Avatar on index
Posted: 06 Apr 2010, 21:37
by Makis
Thank a lot for one more time Stoker!
and
the results are:
[blink]Thanks[/blink]
Re: Avatar on index
Posted: 07 Apr 2010, 16:34
by Makis
Dear Stoker, I don’t know if it’s too much to ask one more thing.
After I made, with your help, the (Avatar on index) snippet I noticed that the users names under the (Registered users) and (Users active over the last 24 hours) became smaller too, at least 1 pt.
My knowledge isn’t enough to understand why this happened.
I will appreciate your answer.
Thanks