[MOD] Better avatar restriction on blocks

This is an improvement for the display of avatars in Blocks...
The 'user block' and the 'top posters block' display avatars.
It can happen when users use larger avatar's,
but it will also happen when avatars are restricted by a maximum avatar width larger than block-width!!
And woooh, have you ever seen what happens with extra wide avatars?
When you're using the '[url=http]remote avatar resizer MOD[/url]', avatars on 'viewtopic' will handle it just fine,
but on the 'portal page', blocks displaying avatars will stretch out completely!!!
[align=right][size=99px]http://www.aero.com/IMAGES/TOPBAR.JPG[/url][/size][/align:18pz9txa]
Sure, users aren't supposed to use avatars like this!!
But I really don't like this to be possible...
We have to avoid this if we can!!
So here, I have used the '[url=http]remote avatar resizer MOD[/url]'-code to put better avatar restrictions on those blocks as well.
It wasn't just copy and paste, mind you.
In stead of using the usual maximum widht and height restrictions, I have applied other restictions.
For maximum width]block-width[/b] - block-borders (15)
For maximum height, I used the restriction that was already there for the 'top posters block']md_avatar_height[/b]
I've found the code for getting block-width on viewtopic.php
Viewtopic uses that for the 'no_thread-stretch MOD' by the way.
So, I only had to copy that piece of code to those blocks as well.
Because these restictions on blocks became different,
I also had to put the same restiction on ALL avatars (not only remote-avatars).
[align=right:18pz9txa][size=99px]
The 'user block' and the 'top posters block' display avatars.
- In the 'user block', the avatar wasn't resized at all.
- In the 'top posters block', avatars are resized in height only.
It can happen when users use larger avatar's,
but it will also happen when avatars are restricted by a maximum avatar width larger than block-width!!
And woooh, have you ever seen what happens with extra wide avatars?
When you're using the '[url=http]remote avatar resizer MOD[/url]', avatars on 'viewtopic' will handle it just fine,
but on the 'portal page', blocks displaying avatars will stretch out completely!!!
[align=right][size=99px]http://www.aero.com/IMAGES/TOPBAR.JPG[/url][/size][/align:18pz9txa]
Sure, users aren't supposed to use avatars like this!!
But I really don't like this to be possible...
We have to avoid this if we can!!
So here, I have used the '[url=http]remote avatar resizer MOD[/url]'-code to put better avatar restrictions on those blocks as well.
It wasn't just copy and paste, mind you.
In stead of using the usual maximum widht and height restrictions, I have applied other restictions.
For maximum width]block-width[/b] - block-borders (15)
For maximum height, I used the restriction that was already there for the 'top posters block']md_avatar_height[/b]
I've found the code for getting block-width on viewtopic.php
Viewtopic uses that for the 'no_thread-stretch MOD' by the way.
So, I only had to copy that piece of code to those blocks as well.
Because these restictions on blocks became different,
I also had to put the same restiction on ALL avatars (not only remote-avatars).
[align=right:18pz9txa][size=99px]