[BETA] Resize Uploaded Avatars MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
black001
Registered User
Posts: 23
Joined: Sun Jan 08, 2006 7:51 pm
Location: Montreal
Contact:

[BETA] Resize Uploaded Avatars MOD

Post by black001 » Mon Jan 09, 2006 3:40 am

Note: This MOD has been validated and inserted into the MOD database. Please get the latest version here: [2.0.20] Resize Uploaded Avatars


MOD Title: Resize Uploaded Avatars MOD
MOD Description: Resizes uploaded avatars to the maximum dimensions.
MOD Version: 0.0.0

MOD Download: no longer available
Last Stable version: N/A

Demo Board: N/A

Hi all,

Many of us want avatars on our boards to be small, but we don't want our users to have to resize their favorite photo. On top of that it would be nice to automatically shrink large avatars on the server, to conserve space and bandwith. I couldn't find a working solution for this, so I wrote one myself. Currently in production at http://www.conquerclub.com.

Well, tell me what you think :)
Last edited by black001 on Mon Jun 09, 2008 3:09 pm, edited 1 time in total.

phantomk
Registered User
Posts: 1039
Joined: Wed Apr 14, 2004 5:32 am
Location: Canada Eh?
Name: Daniel Lee
Contact:

Post by phantomk » Mon Jan 09, 2006 11:23 am

I like it, very simple.

Frold
Registered User
Posts: 447
Joined: Sat Nov 02, 2002 8:19 am

Post by Frold » Mon Jan 09, 2006 1:55 pm

cool - seems very usefull I have missed such function - thanks

d4rk^
Registered User
Posts: 30
Joined: Wed Mar 31, 2004 7:15 pm

Post by d4rk^ » Sat Jan 21, 2006 4:15 pm

Great MOD! Very simple, doesn't uses java and supports GIF, PNG and JPEG!

MrDSL
Registered User
Posts: 283
Joined: Thu Jul 15, 2004 1:52 am
Contact:

Post by MrDSL » Sat Jan 21, 2006 6:07 pm

Nice little mod thanks :)

User avatar
tahoebuff
Registered User
Posts: 1427
Joined: Tue Jul 20, 2004 12:33 am
Location: Nevada
Name: Michael
Contact:

Post by tahoebuff » Sat Jan 21, 2006 7:05 pm

Eliminates the need to resize member pics and change extensions for use as avatars!

Thanks for this great simple mod :D

Tahoebuff

iRuben
Registered User
Posts: 23
Joined: Tue Mar 25, 2003 5:45 am

Post by iRuben » Wed Jan 25, 2006 2:59 pm

Great MOD, made a lot of users happy because they can just upload whatever pic they want now. :-)

Only one question though; the resulting resized avatar looks rather crap. Must have something do with the compression used but I'm not familiar with GD at all. Where can I set GD to compress using a higher quality?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo » Wed Jan 25, 2006 4:26 pm

you should make the mod file a .mod file instead of .txt
My MODs

Need a coder?

Enjoy my Mods? - Image

iRuben
Registered User
Posts: 23
Joined: Tue Mar 25, 2003 5:45 am

Post by iRuben » Wed Jan 25, 2006 4:34 pm

kkroo wrote: you should make the mod file a .mod file instead of .txt


Maybe I wasn't really clear in describing the problem because of my lack of English. The mod IS working okay, but I feel that the resulting picture isn't that good. With programs like Photoshop etc. you can set the compression level or quality of the resulting image. Normally I use a quality of somewhere between 80-90 for good results.

The pics produces by GD in this mod look like a quality of somewhere around 50 or something. So I was wondering what compression-level GD is using by default and how to change that by using some parameter in the mod or something.
Last edited by iRuben on Wed Jan 25, 2006 8:33 pm, edited 1 time in total.

phantomk
Registered User
Posts: 1039
Joined: Wed Apr 14, 2004 5:32 am
Location: Canada Eh?
Name: Daniel Lee
Contact:

Post by phantomk » Wed Jan 25, 2006 7:40 pm

I prefer useing txt's myself :) But I always zip the txt to save space and bandwidth.

ShadowTek
Registered User
Posts: 66
Joined: Thu Jul 22, 2004 8:21 am
Contact:

Post by ShadowTek » Wed Jan 25, 2006 7:52 pm

Cool mod :) works perfect, but it only affects width and height rather then size, so on the part:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Avatar_explain']

#
#-----[ IN-LINE FIND ]------------------------------------------
#
'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.'

#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
'Displays a small graphic image below your details in posts. Only one image can be displayed at a time.'

You may wanna change to this:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Avatar_explain']

#
#-----[ IN-LINE FIND ]------------------------------------------
#
'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.'

#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, the file size must be no more than %d KB..'
So people still know theres a file size limit.

ShadowTek

User avatar
shirleycaat
Registered User
Posts: 186
Joined: Mon Apr 07, 2003 1:11 am

Post by shirleycaat » Wed Jan 25, 2006 9:07 pm

Thank you for this little but nice mod.
It's much simple than this one.


One problem, in profile avatar section, if I check "delete image" when uploading a new image from computer, the original avartar deleted but the new avartar failed to be uploaded.
If I dont check "delete image" while uploading, it works as expected.
It's not a big issue, but may cause some confusion for users.

I dont know if it's a bug or just my own problem, can somebody test and confirm this?
Thank.

iRuben
Registered User
Posts: 23
Joined: Tue Mar 25, 2003 5:45 am

Post by iRuben » Wed Jan 25, 2006 9:12 pm

shirleycaat wrote: I dont know if it's a bug or just my own problem, can somebody test and confirm this?


I don't think it is either a bug or "your problem". I tried myself and you're right. If you check the delete option AND upload a new avatar, the "delete" option seems to have priority. Basically you are using the same "OK" button for two different options; deleting an avatar or uploading a new one. You're probably not supposed to do both at the same time, but if you do, the deletion had priority as it seems.

User avatar
shirleycaat
Registered User
Posts: 186
Joined: Mon Apr 07, 2003 1:11 am

Post by shirleycaat » Wed Jan 25, 2006 9:43 pm

Ok I see, thank you iRuben.

But I think it DOES cause some confusion, beacause when the first time I experience this (after installed this mod), I thought the upload failed and start to think that the mod hasnt been installed correctly or has bug. :roll:

iRuben
Registered User
Posts: 23
Joined: Tue Mar 25, 2003 5:45 am

Post by iRuben » Wed Jan 25, 2006 9:47 pm

shirleycaat wrote: But I think it DOES cause some confusion, beacause when the first time I experience this (after installed this mod)...


I'm not sure how this behaved -before- installing the mod, never tried it. Maybe someone reading this can do a little test -before- installing the mod, I personally don't think it has anything to do with it al all, phpBB is probably behaving like this by itself.

But does anyone know an answer to my question some messages before? How to have better quality JPG pics? Is there any parameter to pass on to GD to have better results?

Post Reply

Return to “[2.0.x] MODs in Development”