Page 3 of 13

Re: [Beta] Resize user's avatar

Posted: Fri Jun 13, 2008 9:44 am
by doviet
yakultbear wrote:i have a great problem whith it!

http://www.ursosmg.com/forum :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:
Hi yakultbear, I see your problem now!

In my MOD instruction, there is:
#
#-----[ FIND ]------------------------------------------
#
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#
require($phpbb_root_path . 'includes/dv_functions_image.' . $phpEx);
You need to add the 2nd line after the 1st one, NOT to replace. I think it's ok now! ^^

Re: [Beta] Resize user's avatar

Posted: Fri Jun 13, 2008 12:21 pm
by mitthoo
doviet wrote:
mitthoo wrote:While going to ACP >> Avatar settings i get this error message

Code: Select all

[phpBB Debug] PHP Notice: in file /adm/index.php on line 292: Undefined index: avatar_auto_resize
[phpBB Debug] PHP Notice: in file /adm/index.php on line 293: Undefined index: avatar_auto_resize
[phpBB Debug] PHP Notice: in file /adm/index.php on line 292: Undefined index: avatar_auto_resize
[phpBB Debug] PHP Notice: in file /adm/index.php on line 293: Undefined index: avatar_auto_resize
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2961)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2961)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2961)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 155: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2961)
Hello, the problem is fixed. You just have to run this SQL query:

Code: Select all

INSERT INTO `phpbb_config`(`config_name`, `config_value`, `is_dynamic`) VALUES ('avatar_auto_resize', 0, 1);
Thank you!
I guess you missed this instruction in your text file.

Anyways its working now.

Re: [Beta] Resize user's avatar

Posted: Fri Jun 13, 2008 1:46 pm
by doviet
mitthoo wrote:I guess you missed this instruction in your text file.

Anyways its working now.
Yes, I haven't added it in the install.txt before you reported this bug. Thank you very much!

Re: [Beta] Resize user's avatar

Posted: Fri Jun 20, 2008 1:08 am
by hp_solomon
works like a charm! thank you!

by the way, what is the status of this mod to make this in the mod database? Can't wait to make it official..

Re: [Beta] Resize user's avatar

Posted: Fri Jun 20, 2008 5:50 pm
by hp_solomon
i have a question, what happens to the original file? is it uploaded too on the server but gets orphaned?

i worry that using this mod will get the server lots of unused images because the original files are not deleted on the process.. Please clarify, thanks!

Re: [Beta] Resize user's avatar

Posted: Fri Jun 20, 2008 7:34 pm
by flexx
can I use this mod like a profile foto mod?? :?

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 9:22 am
by hp_solomon
hp_solomon wrote:i have a question, what happens to the original file? is it uploaded too on the server but gets orphaned?

i worry that using this mod will get the server lots of unused images because the original files are not deleted on the process.. Please clarify, thanks!
anyone?

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 10:44 am
by doviet
hp_solomon wrote:i have a question, what happens to the original file? is it uploaded too on the server but gets orphaned?

i worry that using this mod will get the server lots of unused images because the original files are not deleted on the process.. Please clarify, thanks!
Hi,
Don't worry, this MOD will resize the image in the temp directory before moving to your avatar folder. So, there is no unused image in the avatar folder.

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 10:57 am
by doviet
hp_solomon wrote:works like a charm! thank you!

by the way, what is the status of this mod to make this in the mod database? Can't wait to make it official..
Sorry, I'm busy at the moment :(
The MOD is already finished, I want to release it in the MOD db of phpbb.com, but I don't have time to make an install instruction file with MODX, so my MOD can't be accepted by phpbb.com yet.

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 11:23 am
by danielnguyen
How can I update from 0.0.2b to 0.0.3b please!

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 2:51 pm
by doviet
danielnguyen wrote:How can I update from 0.0.2b to 0.0.3b please!
Hi,

Please verify that `avatar_auto_resize` doesn't exist in your `phpbb_config` table.
If it already exists, you don't need to do anything, if it doesn't exist yet, you can insert into your config table:

Code: Select all

INSERT INTO `phpbb_config`(`config_name`, `config_value`, `is_dynamic`) VALUES ('avatar_auto_resize', 0, 1);
There are some problems that only occurred at some servers, so the version 0.0.3b was made to avoid these problems at any servers.

Chào bạn nhé :P

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 9:15 pm
by hp_solomon
does it comply with the maximum image file size of avatar? what if the resized image is higher than the maximum image file size?

also. why not put the

Code: Select all

require($phpbb_root_path . 'includes/dv_functions_image.' . $phpEx);
inside functions_upload.php since it is only called when calling move_file function. it'll save us a little bit of php processing and less files to edit.

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 10:27 pm
by hp_solomon
i sometimes got this error when uploading jpg file

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/dv_functions_image.php on line 138: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 178 extraneous bytes before marker 0xd9
[phpBB Debug] PHP Notice: in file /includes/dv_functions_image.php on line 138: imagecreatefromjpeg() [function.imagecreatefromjpeg]: './images/avatars/upload/7884831d9bc3ba1d4c80b1e31c29cdf2_2.jpg' is not a valid JPEG file
[phpBB Debug] PHP Notice: in file /includes/dv_functions_image.php on line 139: imagecopyresampled(): supplied argument is not a valid Image resource

Re: [Beta] Resize user's avatar

Posted: Sun Jun 22, 2008 10:34 pm
by doviet
hp_solomon wrote:does it comply with the maximum image file size of avatar? what if the resized image is higher than the maximum image file size?
Hello,

No, it currently doesn't comply with the file size limit. I've already thought about that, but I don't think that it's important, because the file size is also reduced when the script resizes the image.
However, can you tell me your limits of image dimensions and file size? I'll test with your limits, if your limits are reasonable and the file size (after being resized) is still bigger than your limit, I'll make it better in the next version of this MOD ^^
hp_solomon wrote: also. why not put the

Code: Select all

require($phpbb_root_path . 'includes/dv_functions_image.' . $phpEx);
inside functions_upload.php since it is only called when calling move_file function. it'll save us a little bit of php processing and less files to edit.
Yeah, I'll change it in the next version of this MOD. Thank you!
hp_solomon wrote:i sometimes got this error when uploading jpg file

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/dv_functions_image.php on line 138: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 178 extraneous bytes before marker 0xd9
[phpBB Debug] PHP Notice: in file /includes/dv_functions_image.php on line 138: imagecreatefromjpeg() [function.imagecreatefromjpeg]: './images/avatars/upload/7884831d9bc3ba1d4c80b1e31c29cdf2_2.jpg' is not a valid JPEG file
[phpBB Debug] PHP Notice: in file /includes/dv_functions_image.php on line 139: imagecopyresampled(): supplied argument is not a valid Image resource
Please try to upload another image, I don't think that the problem comes from my script. Maybe your JPEG image is damaged (try to save is as another file, if you can open it with Photoshop).
Corrupt JPEG data: 178 extraneous bytes before marker 0xd9

Re: [Beta] Resize user's avatar

Posted: Mon Jun 23, 2008 3:44 am
by hp_solomon
i cant upload an image if i set the file size smaller and the image for upload file size is bigger.. i think you should have this logic with this mod

if width/height is between the max-min width/height setting then apply max-file size ruling.
if widht/height is bigger than the max width/height setting then resize the image ignoring max-file size ruling/setting.