[drupal-devel] [task] Maximum picture size help text in profile no
longer needed
Dries
drupal-devel at drupal.org
Sat Jul 30 17:20:24 UTC 2005
Issue status update for
http://drupal.org/node/27234
Post a follow up:
http://drupal.org/project/comments/add/27234
Project: Drupal
Version: cvs
Component: user.module
Category: tasks
Priority: normal
Assigned to: nysus
Reported by: nysus
Updated by: Dries
Status: patch (code needs review)
nysus: mainly you but also the other developers who want to see this
fixed.
Dries
Previous comments:
------------------------------------------------------------------------
Fri, 22 Jul 2005 00:51:16 +0000 : nysus
Attachment: http://drupal.org/files/issues/user_22.patch (1.06 KB)
This change removes the maximum dimensions and file size text appears in
the description for uploading user profile images (avatars). Drupal
appears to handle the resizing of images automatically now so text is
not needed.
------------------------------------------------------------------------
Fri, 22 Jul 2005 00:59:40 +0000 : nysus
Attachment: http://drupal.org/files/issues/user_23.patch (1.06 KB)
Bug in above patch (missing paren) fixed.
------------------------------------------------------------------------
Fri, 22 Jul 2005 01:48:31 +0000 : mathias
The maximum width and height dimensions still apply when there is no
image library installed (see user_validate_picture()). Maybe we could
detect if an image library is present and inform the user their picture
will automatically be resized to dimension x and y, otherwise the text
is displayed as it presently is.
------------------------------------------------------------------------
Fri, 22 Jul 2005 08:30:37 +0000 : Dries
I didn't even know we could run without an image library installed. Is
that a valid scenario, or more of a left-over from the Drupal 4.5 era?
If possible, I'd prefer having one way of doing things, rather than
having a new and old way of doing things.
------------------------------------------------------------------------
Sat, 23 Jul 2005 08:13:04 +0000 : Bèr Kessels
I am all for a image-toolkit-only system. But I am a bit concerned that
that will rule out a lot of people who have no access to the server/php
set up.
So, would it be worth it, for sake of usability and ease-of use to
demand a toolkit for thumbs, and leave those who have no server softwar
efor hendling images without avatars?
------------------------------------------------------------------------
Mon, 25 Jul 2005 15:02:19 +0000 : Steven
-1 on this.
For one thing, it still makes sense to inform people what the maximum
avatar size is. Don't underestimate how many avatars are custom made
for a particular site.
Secondly, it is important to know the maximum size for animated
avatars... if they go over the maximum size, they are resized and come
out as static images. Without this info you would need trial and error
to figure it out.
------------------------------------------------------------------------
Wed, 27 Jul 2005 12:17:19 +0000 : nysus
The big problem with displaying the dimensions and maximum size is that
if people have an image that exceeds those limits, they will not bother
to upload the image because they think they will have to open their
image editing software to do that. Those instructions serve as an
image upload deterrent, not a help at all.
------------------------------------------------------------------------
Wed, 27 Jul 2005 12:25:54 +0000 : nysus
Attachment: http://drupal.org/files/issues/user_24.patch (1.3 KB)
Here's a compromise patch to address Steven's objection. I don't know
the best way to detect if an image library is installed. Someone else
will have to write that or at least save me time and give me a hint on
how to do it.
------------------------------------------------------------------------
Wed, 27 Jul 2005 13:58:10 +0000 : mathias
You can use image_get_toolkit() to check if an image library is
installed. Here's some sample code taken from user.module.
<?php
if (image_get_toolkit()) { // Imaging library exists
image_scale($file->filepath, $file->filepath, $maxwidth,
$maxheight);
}
?>
Once the profile help text is based on the existence of an image
library, this patch would be good to go.
------------------------------------------------------------------------
Wed, 27 Jul 2005 14:00:26 +0000 : mathias
You can use image_get_toolkit() to check if an image library is
installed. Here's some sample code taken from user.module.
<?php
if (image_get_toolkit()) { // Imaging library exists
image_scale($file->filepath, $file->filepath, $maxwidth,
$maxheight);
}
?>
Once the profile help text is based on the existence of an image
library, this patch would be good to go.
------------------------------------------------------------------------
Fri, 29 Jul 2005 09:24:47 +0000 : nysus
Attachment: http://drupal.org/files/issues/user_26.patch (1.38 KB)
Thanks for the hand, Mathias. Here's a new patch.
------------------------------------------------------------------------
Fri, 29 Jul 2005 13:47:58 +0000 : mathias
+1 for this patch and the additional help text it provides.
------------------------------------------------------------------------
Fri, 29 Jul 2005 15:38:51 +0000 : Bèr Kessels
The patch applies and works.
But I find the text: Your image will be automatically resized to fit
the maximum dimension of 100x100 and maximum file size of 200 k
strange. how can something be resized under the maximum file size of
200 k ?
------------------------------------------------------------------------
Fri, 29 Jul 2005 15:53:52 +0000 : Bèr Kessels
On second thought: I (personally) dislike giving this kind of
information. These are exactly the texts that scare people away, or at
least make them not even read a text.
But I will not object against this patch on that basis, since I can
change it, using locales. I will change it to "If your image is too
big, it will be resized". For me, that is more then enought
information. And for Joe Average it s too.
------------------------------------------------------------------------
Fri, 29 Jul 2005 17:15:36 +0000 : killes at www.drop.org
I agree with Ber, there is no need to scare or bore end users with this
kind of info.
------------------------------------------------------------------------
Sat, 30 Jul 2005 15:43:49 +0000 : Dries
Here is what I want you to do: go for a image toolkit only approach --
that is what we introduced toolkits for. If I'm not mistaken, there
are several toolkits available in contrib so people should be able to
find a working toolkit.
This means, you'll have to simplify/test user_validate_picture() and
the surrounding code. While testing, I'd modify image_get_toolkit() to
return NULL to 'simulate' the absense of a toolkit.
Can you investigate that?
------------------------------------------------------------------------
Sat, 30 Jul 2005 16:40:47 +0000 : nysus
Dries, who are you addressing here?
More information about the drupal-devel
mailing list