[ABD] Avatar auto resize (0.0.4b)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
doviet
Registered User
Posts: 52
Joined: Sun Apr 27, 2008 4:17 am

Re: [Beta] Resize user's avatar

Post by doviet » Fri Jun 13, 2008 9:44 am

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! ^^

User avatar
mitthoo
Registered User
Posts: 253
Joined: Tue Oct 03, 2006 12:34 pm

Re: [Beta] Resize user's avatar

Post by mitthoo » Fri Jun 13, 2008 12:21 pm

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.

doviet
Registered User
Posts: 52
Joined: Sun Apr 27, 2008 4:17 am

Re: [Beta] Resize user's avatar

Post by doviet » Fri Jun 13, 2008 1:46 pm

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!

hp_solomon
Registered User
Posts: 269
Joined: Wed Mar 30, 2005 8:06 am

Re: [Beta] Resize user's avatar

Post by hp_solomon » Fri Jun 20, 2008 1:08 am

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..

hp_solomon
Registered User
Posts: 269
Joined: Wed Mar 30, 2005 8:06 am

Re: [Beta] Resize user's avatar

Post by hp_solomon » Fri Jun 20, 2008 5:50 pm

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!

flexx
Registered User
Posts: 75
Joined: Thu Aug 30, 2007 8:16 pm

Re: [Beta] Resize user's avatar

Post by flexx » Fri Jun 20, 2008 7:34 pm

can I use this mod like a profile foto mod?? :?

hp_solomon
Registered User
Posts: 269
Joined: Wed Mar 30, 2005 8:06 am

Re: [Beta] Resize user's avatar

Post by hp_solomon » Sun Jun 22, 2008 9:22 am

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?

doviet
Registered User
Posts: 52
Joined: Sun Apr 27, 2008 4:17 am

Re: [Beta] Resize user's avatar

Post by doviet » Sun Jun 22, 2008 10:44 am

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.

doviet
Registered User
Posts: 52
Joined: Sun Apr 27, 2008 4:17 am

Re: [Beta] Resize user's avatar

Post by doviet » Sun Jun 22, 2008 10:57 am

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.

danielnguyen
Registered User
Posts: 287
Joined: Thu Jan 24, 2008 11:44 am
Location: Vietnam
Contact:

Re: [Beta] Resize user's avatar

Post by danielnguyen » Sun Jun 22, 2008 11:23 am

How can I update from 0.0.2b to 0.0.3b please!
My forum, for just teen only with many happy things
Cộng Đồng Teen Online - Cộng Đồng Teen Việt - Teen Việt Nam
Hội Ngộ - Giao Lưu - Học Hỏi - Giải Trí - Kết Bạn
http://www.congdongteenonline.net

doviet
Registered User
Posts: 52
Joined: Sun Apr 27, 2008 4:17 am

Re: [Beta] Resize user's avatar

Post by doviet » Sun Jun 22, 2008 2:51 pm

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

hp_solomon
Registered User
Posts: 269
Joined: Wed Mar 30, 2005 8:06 am

Re: [Beta] Resize user's avatar

Post by hp_solomon » Sun Jun 22, 2008 9:15 pm

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.

hp_solomon
Registered User
Posts: 269
Joined: Wed Mar 30, 2005 8:06 am

Re: [Beta] Resize user's avatar

Post by hp_solomon » Sun Jun 22, 2008 10:27 pm

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

doviet
Registered User
Posts: 52
Joined: Sun Apr 27, 2008 4:17 am

Re: [Beta] Resize user's avatar

Post by doviet » Sun Jun 22, 2008 10:34 pm

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

hp_solomon
Registered User
Posts: 269
Joined: Wed Mar 30, 2005 8:06 am

Re: [Beta] Resize user's avatar

Post by hp_solomon » Mon Jun 23, 2008 3:44 am

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.

Locked

Return to “[3.0.x] Abandoned MODs”