Print Page | Close Window

Feature suggestion - Avatars

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=19906
Printed Date: 11 April 2026 at 7:27pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Feature suggestion - Avatars
Posted By: RadioActiveLamb
Subject: Feature suggestion - Avatars
Date Posted: 17 May 2006 at 12:15am
I'd like to restrict the avatar size by dimensions, not just file size.  Currently, the 64x64 fixed avatar is too small in my opinion.  I'd like to give my users the flexibility to upload larger or different shapped avatars (100x200 max)



Replies:
Posted By: WebWiz-Bruce
Date Posted: 17 May 2006 at 10:02am
This can be changed by editing the default_style.css file.

I had hoped to use the CSS max-width property for the avatar size which would had allowed greater flexibility just like you mention, but the only browser not yet to implement this is crappy IE, so I was forced to go back to fixed avatar sizing after allot of complaints from IE users.

At the moment it doesn't even look like this CSS property will be implement in IE 7 either Unhappy


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: RadioActiveLamb
Date Posted: 17 May 2006 at 3:35pm
Why not implement a max avatar size as a server-side function, and not rely on the client to render it properly?  We're migrating from a PHPBB2 board which does it this way.  Only PHPBB2 doesn't have the size limiter that WWF has (nifty!)
 
Thanks for the heads-up on the CSS property.  I'll bump-up the size to 100x100 to make the natives happier.


Posted By: WebWiz-Bruce
Date Posted: 17 May 2006 at 4:19pm
I believe in PhpBB there is nothing to stop a user from having an avatar of any size they like, even as big as 1000 pixles wide which would screw up your forum layout.

Most forum admins don't like this and want a way to control this. The max-width property in CSS allows any size avatars upto a set size, which is ideal, however, this isn't supported in IE so again users can use avatars over the set size which screws up the page layout.

I did try to use the max-width CSS, but so many people complained that I had to go back to the set size.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Imperator
Date Posted: 17 May 2006 at 4:57pm
Max-width/max-height can be done in IE, but involves a work-around. For example, this is the code I used in the previous version of the forum to limit signature height:

strAuthorSignature="<div style=""height:expression(this.scrollHeight > 125? '125px' : 'auto' ); width:600px; z-index:1; overflow: hidden; max-height:125px;"">"+strAuthorSignature+"</div>"

The above code limits the signature to 125 height. Something similar can probably be done to avatars.


Posted By: WebWiz-Bruce
Date Posted: 17 May 2006 at 8:35pm
Max-height does work in IE, but just not on images.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Imperator
Date Posted: 17 May 2006 at 9:47pm
You can place the image inside the div tag as shown above. The div tag will "resize" depending on the size of the image, but will not stretch beyond the set limit.

I don't know. (We might be talking about different things...)


Posted By: SweetLou
Date Posted: 17 May 2006 at 10:43pm
Originally posted by -boRg- -boRg- wrote:

I believe in PhpBB there is nothing to stop a user from having an avatar of any size they like, even as big as 1000 pixles wide which would screw up your forum layout.
Not entirely true, in phpBB2 the admin can set the dimensions and the size of avatars, except it doesn't work for avatars that are linked from other sites, only to uploaded avatars. But, there are quite a few mods that will resize or not allow them.
I haven't looked at phpBB2's code closely, but I think instead of using css for the size, it reads the dimensions of the image and checks the value for the height and width in the database when first uploading it, if it is too large, it just rejects it. Of course, you will need a component to read these dimensions.


Posted By: RadioActiveLamb
Date Posted: 18 May 2006 at 2:53am
PHPBB2 has avatar size controls.  When a user updloads an avatar, the size of the image is validated against the max size.  If it's too big, the upload is denied.  It is the user's responsibility to provide an avatar within the max dimensions, so there's some server-side image validation going on. 
 
Screen shot of the avatar controls: http://mhvillages.net/files/avatarsettings.gif - http://mhvillages.net/files/avatarsettings.gif


Posted By: WebWiz-Bruce
Date Posted: 18 May 2006 at 10:00am
PHP has functions built into it for knowing the dimensions of an image when uploaded, in ASP you don't have this.

It is available in a few more expensive upload components, but not enough to include support for this.

For the moment, until max-width and max-height are available in IE, avatar will have to remain a fixed size.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net