Avatar on index

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Avatar on index

Post by Fire-Fox »

I did replace the "xx" with your width and height :)
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: Avatar on index

Post 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.
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Avatar on index

Post by Fire-Fox »

refresh your template?
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: Avatar on index

Post by Makis »

I ALWAYS do
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: Avatar on index

Post by Stoker »

Fire-Fox, please post a demo where you have this working.
Board rules! No PM support
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: Avatar on index

Post 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
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Avatar on index

Post 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...
Last edited by Fire-Fox on 05 Apr 2010, 22:38, edited 1 time in total.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: Avatar on index

Post 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.
Board rules! No PM support
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: Avatar on index

Post by Makis »

Thank a lot for one more time Stoker! :D and
the results are:

Image

[blink]Thanks[/blink]
User avatar
Makis
BBCoder III
BBCoder III
Posts: 91
Joined: 10 Mar 2010, 18:01
BBCodes: 67
Favourite MOD: Welcome On Index
Location: Athens Greece

Re: Avatar on index

Post 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 :)
Locked