Avatar size

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Cloud
Registered User
Posts: 9
Joined: Fri Feb 28, 2003 8:45 pm

Avatar size

Post by Cloud »

With phpbb2.0.x avatar size limits could be broken by linking to an off site avatar.... Is there any chance that this will be "fixed" in 2.2?
Unique, just like everyone else.
lotsalag.net
Registered User
Posts: 2
Joined: Sat May 31, 2003 12:41 pm

Re: Avatar size

Post by lotsalag.net »

i certainly hope so

this is a big problem in phpbb atm
User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: Avatar size

Post by psoTFX »

argh!

It's impossible to guarantee that an offsite avatar is within the dimension and filesize limits ... unless you're willing to sacrifice rendering/processing time. The only way to achieve this would be to check the avatar each and every view. That would require a remote connection be made and the dimensions obtained. If you wanted to ensure filesize limits were met you'd need to grab the entire avatar (since filesize cannot operate on remote files). On slow remote servers this would (browser depending) halt rendering while the process is carried out. It would also impose additional load on the server since every such avatar would require a new script process.

In 2.2 what I have done is require size (width and height) dimensions be entered ... if they aren't the dimensions (for all avatar types) are obtained if possible. So yes, it is tackled in a "sort of way" ... but if you're worried about users abusing the remote avatar capability, disable it and use a more appropriate (gallery or upload) method.
User avatar
haravikk
Registered User
Posts: 292
Joined: Sun Apr 20, 2003 5:05 pm
Contact:

Re: Avatar size

Post by haravikk »

What you've put in should do it shouldn't it? If a user chooses an image remotely then they are required to put in dimensions, if these are in excess of the maximum it will refuse it, if unentered then it will default to max? That would track the dimensions fine which is the main problem really.
If moderators can be given access to edit "minor" user items like signature, avatar etc then filesize can be avoided with moderators checking any suspect images and disabling them if necessary
Images in sigs! please.
User avatar
dhn
Registered User
Posts: 1518
Joined: Wed Jul 04, 2001 8:10 am
Location: Around the corner
Contact:

Re: Avatar size

Post by dhn »

Thinking aloud, shouldn't it be enough to get the size of the remote avatar when the link is entered and then just hardcode it (if it is within the limits?)? I don't think having a user entering the size manually is a good idea, simply for usablitly reasons.
Last edited by dhn on Sun Jun 01, 2003 8:55 pm, edited 1 time in total.
Image
User avatar
Madcow
Registered User
Posts: 18
Joined: Sat May 31, 2003 1:54 am
Location: Lost in the wonder of Area51
Contact:

Re: Avatar size

Post by Madcow »

Like saying in the <img> tag that highth is a certain number of pixles and width is a certain number of pixles?
User avatar
dhn
Registered User
Posts: 1518
Joined: Wed Jul 04, 2001 8:10 am
Location: Around the corner
Contact:

Re: Avatar size

Post by dhn »

Yep.

postcount++
Image
User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: Avatar size

Post by psoTFX »

When you upload (form or box) or link to an avatar phpBB attempts to set the width and height details automatically. If it cannot it will drop back with an error. Remember that some servers will sit behind firewalls where no new (syn) connections may be established ... in these cases we cannot obtain the dimensions. If we don't allow manual setting we may have a few peeved users.

No, this is not a perfect solution for the "problem" (as I've explained many many many times before ;) ). It doesn't stop users replacing their remotely linked 6kb avatar with a 1.2MB version (of whatever dimension), nor does it prevent someone changing it for a larger or smaller avatar which will look totally "wrong" when viewed.

The only way to guarantee an avatar meets your min/max dimension/filesize limits is to upload it to your server ... there you have complete control over it.
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: Avatar size

Post by Nuttzy99 »

dhn wrote:Yep.

postcount++
Your forgot the ";"

Code: Select all

<?php
  global postcount ;

  postcount++ ; //  :P 
?>
-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
Bertg
Registered User
Posts: 190
Joined: Wed Apr 30, 2003 1:02 pm
Location: Brugge, Belgium
Contact:

Re: Avatar size

Post by Bertg »

idea....

(should be in tracker i know...)

In the admin section you could include a "Check remote avatars"-function...

This sould be able to see if size or dimetions are not in order...
(if not by script, I't 'll be posible on view)

Then you can warn that usere, or delete his avatar..

-bert-
Portfolio | Proud to be phpBB user
Post Reply