https://www.icyphoenix.com/viewtopic.php?f=35&t=2088
-----------------------------------
JasonTheReaper
Thu 24 May, 2007 20:17

Avatar Sizes
-----------------------------------
Hi, I have a big problem. The avatar in my website are 80x80 pixel but in the config. panel I set them 150x200.
Why they are still in the old dimension?

You can see it:
http://www.hattrickitalia.org/hi/viewtopic.php?p=621#p621


-----------------------------------
Zuker
Thu 24 May, 2007 20:54

Re: Avatar Sizes
-----------------------------------
have u clean cache after changing that ?


-----------------------------------
JasonTheReaper
Thu 24 May, 2007 21:07

Re: Avatar Sizes
-----------------------------------
Thank you for the answer, there is a button in ACP for cleaning cache? or I should do something with ftp?


-----------------------------------
Zuker
Thu 24 May, 2007 21:17

Re: Avatar Sizes
-----------------------------------
Yes, inside extreme styles


-----------------------------------
JasonTheReaper
Thu 24 May, 2007 21:22

Re: Avatar Sizes
-----------------------------------
I click on empty cache and then compile cache but the avatar sizes are always the same :( :(


-----------------------------------
JasonTheReaper
Fri 25 May, 2007 08:24

Re: Avatar Sizes
-----------------------------------
I don't know how to do... please help me


-----------------------------------
Vortex
Fri 25 May, 2007 10:44

Re: Avatar Sizes
-----------------------------------
[quote user="JasonTheReaper" post="14966"]I click on empty cache and then compile cache but the avatar sizes are always the same :( :([/quote]


Hm... let me understand, what is the same? The sizes shown in ACP or the avatar images? If you are talking about the images shown in viewtopic it's perfectly normal. You set a limit, already uploaded avatars don't change... you can't automatically enlarge them from ACP  :mrviolet:


-----------------------------------
JasonTheReaper
Fri 25 May, 2007 13:31

Re: Avatar Sizes
-----------------------------------
This is the first avatar:

http://img410.imageshack.us/img410/9323/hammerscudonomeinavataryj8.jpg

of that post:

http://www.hattrickitalia.org/hi/viewtopic.php?p=621


You can see that img is 200x179 but in the topic is restrict to 80x80 due to HTML forcing width and height. Why?? I have set 150x200 as max avatar size in ACP.


-----------------------------------
JasonTheReaper
Fri 25 May, 2007 16:10

Re: Avatar Sizes
-----------------------------------
I understand that only avatar type # 2 are affected by this problems (avatar linked from another website).
Avatar type #1 (uploaded in my website) are in the right dimensions...


-----------------------------------
JasonTheReaper
Fri 25 May, 2007 17:07

Re: Avatar Sizes
-----------------------------------
I scan the code and I found the problem.

File  includes/functions.php on lines 1896, 1897 there are 2 variables:
[code]$avatar_width = 80;
$avatar_height = 80;[/code]

I replace them with:
[code]$avatar_width = $board_config['avatar_max_width'];
$avatar_height = $board_config['avatar_max_height'];[/code]


-----------------------------------
Mighty Gorgon
Sat 26 May, 2007 03:08

Re: FIXED - Avatar Sizes
-----------------------------------
Thanks for pointing this out.

I've modified that code because it was slowing up some sites with no IMAGE RESIZE capabilities.

That's why I've forced avatars to be 80 pixel wide and tall.

I still have to verify the implication of this.

Please, keep me posted if you discover something else about this issue.

[ot]Your site is quite big, I read about some users disappointed by Icy Phoenix :mri: . Since your site is an high traffic site, let me know if you encounter problems as soon as the db increases... Thanks![/ot]


-----------------------------------
JasonTheReaper
Sat 26 May, 2007 12:10

Re: Avatar Sizes
-----------------------------------
Hi MG.
I think that the problem is in getimagesize function:

[code linenumbers=false]$pic_size = @getimagesize($avatar_url);[/code]

Probably that function try to connect to all avatars websites and if there is at least one website slow the page is very very slow...
I think also that resize_avatar() function is not needed because when you set an avatar in your profile there is already a dimension control...

(sorry for my bad english)


OT: Users are disappointed by website response but I think is a server performance problem. Before I use PHP-Nuke (2004 version) modded by me and we have the same problem. We reach a 350 mb database... I choose your project because is wonderful! Do you suggest me a quick and good price hosting? thanks and congratulations


-----------------------------------
Mighty Gorgon
Wed 30 May, 2007 12:37

Re: FIXED - Avatar Sizes
-----------------------------------
[quote user="JasonTheReaper" post="15275"]Hi MG.
I think that the problem is in getimagesize function:

[code linenumbers=false]$pic_size = @getimagesize($avatar_url);[/code]

Probably that function try to connect to all avatars websites and if there is at least one website slow the page is very very slow...
I think also that resize_avatar() function is not needed because when you set an avatar in your profile there is already a dimension control...[/quote]

Your english is not bad... :wink:

You got the point: the getimagesize function on some servers is tremendously slow, and I can't understand why... that's why I have removed it. I can add a switch for enabling it on fast servers... I'll think about it.

Thanks


[quote user="JasonTheReaper" post="15275"]OT: Users are disappointed by website response but I think is a server performance problem. Before I use PHP-Nuke (2004 version) modded by me and we have the same problem. We reach a 350 mb database... I choose your project because is wonderful! Do you suggest me a quick and good price hosting? thanks and congratulations[/quote]
I'm using Aruba on shared server since 2001 and I'm really satisfied with them. I had just few problems, but I get them solved with some patience... If you are able to configure fine your applications, shared servers are fine and cheap. If you think you need an higher level of service, of course you have to switch to a virtual or a dedicated server...


