| Author |
Topic Search Topic Options
|
RadioActiveLamb
Groupie
Joined: 29 December 2005
Location: United States
Status: Offline
Points: 171
|
Topic: Feature suggestion - Avatars 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)
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
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
|
|
|
 |
RadioActiveLamb
Groupie
Joined: 29 December 2005
Location: United States
Status: Offline
Points: 171
|
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.
Edited by RadioActiveLamb - 17 May 2006 at 3:36pm
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
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.
|
|
|
 |
Imperator
Newbie
Joined: 02 October 2004
Status: Offline
Points: 39
|
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.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Posted: 17 May 2006 at 8:35pm |
|
Max-height does work in IE, but just not on images.
|
|
|
 |
Imperator
Newbie
Joined: 02 October 2004
Status: Offline
Points: 39
|
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...)
|
 |
SweetLou
Newbie
Joined: 17 May 2006
Status: Offline
Points: 3
|
Posted: 17 May 2006 at 10:43pm |
-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.
|
 |