[2.0.20] Resize Uploaded Avatars

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
7
70%
Very Good
1
10%
Good
2
20%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 10

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28564
Joined: Sat Aug 16, 2003 7:36 am

[2.0.20] Resize Uploaded Avatars

Post by Extensions Robot »

MOD Name: Resize Uploaded Avatars
Author: black001
MOD Description: Resizes uploaded avatars to the maximum dimensions.


MOD Version: 1.0.0

Download File: resize_uploaded_avatars_1_0_0a.mod
mods overview page: View
File Size: 5122 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Validated/Released

Notes:
This MOD requires functions available from GD Library version 2.0.28 or higher.
User avatar
master2004134
Registered User
Posts: 44
Joined: Sat Jan 28, 2006 9:41 pm
Location: Behind You!
Contact:

Post by master2004134 »

Are you sure it's a good idea to make avatars bigger automatically? After all, it could distort them, unless it only adjusts them if the avatars exceed the limits....
black001
Registered User
Posts: 23
Joined: Sun Jan 08, 2006 7:51 pm
Location: Montreal
Contact:

Post by black001 »

Yes, that would be a bad thing. Fortunately this MOD only downsizes avatars that are too large.
krisztavx
Registered User
Posts: 51
Joined: Wed Jun 29, 2005 12:30 pm
Contact:

Post by krisztavx »

This MOD requires functions available from GD Library version 2.0.28 or higher.


May I ask what GD Library is? An other mod that should be added before I use this mod?

Thanks,

K
User avatar
Saeru
Registered User
Posts: 622
Joined: Sun Feb 19, 2006 5:44 am
Location: Under a pile of PHP code.
Contact:

Post by Saeru »

Nice but.. I'd rather use the Remote Avatar Check Mod.. so rather then resizing an avatar, it just wont let you use one that's over the size, and file size limit..
"Naku ga yousuru ichidanto tsuyosa kyaku ga icchuu wo yusuru."[/size]
black001
Registered User
Posts: 23
Joined: Sun Jan 08, 2006 7:51 pm
Location: Montreal
Contact:

Post by black001 »

krisztavx wrote: May I ask what GD Library is? An other mod that should be added before I use this mod?


The GD Library is a component of PHP. If you host your website with an ISP chances are your PHP is configured with a recent enough version of the GD Library.
Stevish
Registered User
Posts: 12
Joined: Thu May 11, 2006 4:23 am

Ratios?

Post by Stevish »

If this mod resizes a large avater (say they upload one that's 200X300 pixels, and my max is set to 100X100), will it keep the proper ratios, or will it distort/crop the image to make it square (in the example above would it be resized to 100X100 or 67X100 (thus not cropping or distorting the image))?

Thanks
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Post by lefty74 »

I take it you have not looked at the mod yet...:wink:

Code: Select all

## Author Notes:
## This MOD will automatically resize the uploaded avatar to the
## Maximum Avatar Dimensions set in General Configuration. For example,
## if you upload a 400 x 300 avatar and the admin set avatar size to
## 100 x 100, this MOD will resize the avatar proportionally to 100 x 75. 
## This MOD handles GIF, PNG and JPEG images. This MOD requires the
## GD Library version 2.0.28 or higher. I deleted some instructions
## on the profile page, so if you have a multilingual board you must
## apply the change to lang_main.php of each language. After applying
## this MOD, Maximum Avatar File Size in General Configuration will
## apply to the original avatar before it is resized, so you might
## as well set it to something high like 2048000 (2000 KB).
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
Stevish
Registered User
Posts: 12
Joined: Thu May 11, 2006 4:23 am

Post by Stevish »

:oops:

Well, thanks for pointing it out for me... you're right, I hadn't looked at the file yet. I'm downloading it now! I'm excited about it!

:D :D :D
Moddage
Registered User
Posts: 8
Joined: Wed May 17, 2006 10:25 pm

Post by Moddage »

I installed the mod, and tried to upload an avatar with it, and this error message, or messages rather, popped up on the top of the page.

what's wrong?

i have phpBB 2.0.20 installed

Warning: move_uploaded_file(./images/avatars/924476890448226da187e2.jpg): failed to open stream: Permission denied in /public_html/forums/includes/usercp_avatar.php on line 289

Warning: move_uploaded_file(): Unable to move '/tmp/php3bAZ67' to './images/avatars/924476890448226da187e2.jpg' in /public_html/forums/includes/usercp_avatar.php on line 289

Warning: imagecreatefromjpeg(./images/avatars/924476890448226da187e2.jpg): failed to open stream: No such file or directory in /public_html/forums/includes/usercp_avatar.php on line 324

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /public_html/forums/includes/usercp_avatar.php on line 326

Warning: imagejpeg(): Unable to open './images/avatars/924476890448226da187e2.jpg' for writing in /public_html/forums/includes/usercp_avatar.php on line 327

Warning: Cannot modify header information - headers already sent by (output started at /public_html/forums/includes/usercp_avatar.php:289) in /public_html/forums/includes/page_header.php on line 535

Warning: Cannot modify header information - headers already sent by (output started at /public_html/forums/includes/usercp_avatar.php:289) in /public_html/forums/includes/page_header.php on line 537

Warning: Cannot modify header information - headers already sent by (output started at /public_html/forums/includes/usercp_avatar.php:289) in /public_html/forums/includes/page_header.php on line 538
Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

does this work with the Profile Control Panel? (PCP?)

Thanks.
Moddage
Registered User
Posts: 8
Joined: Wed May 17, 2006 10:25 pm

Post by Moddage »

according to my host, they have a GD 2.0.28 compitble version installed... so i'm still not sure what was wrong when i installed the mod.

it's uninstalled for now, any/all help is appreciated
Moddage
Registered User
Posts: 8
Joined: Wed May 17, 2006 10:25 pm

Post by Moddage »

nevermind.

i figured it out.


the permissions of the avatars folder was causing it not to work... changed the folder permissions, all is go!

so far, i really really love this mod!!!!!

NICE WORK! :D
brusq
Registered User
Posts: 3
Joined: Sat Jun 10, 2006 7:20 pm

ERROR on resize avatar

Post by brusq »

Fatal error: Call to undefined function: imagecreatefromjpeg() in e:\domains\f\forumbahane.com\user\htdocs\includes\usercp_avatar.php on line 324

i am getting this error if you point me in the right directiion please thank you....
Post Reply

Return to “[2.0.x] MOD Database Releases”