Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
Geek Auto Avatar Resizer Details »»
Geek Auto Avatar Resizer
Version: 1.00, by The Geek The Geek is offline
Developer Last Online: Jan 2019 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-16-2005 Last Update: Never Installs: 33
Is in Beta Stage  
No support by the author.

Basically this is a very simple addition to stop the mega computer literate who use my forums driving everyone insane with their 'I tried to upload my pic as an avatar but its too big - how do I resize it'.

In a nutshell, this will automatically resize the uploaded avatar (and profile picture) to your max dimensions (if it is too big).
It must still be smaller than the Custom Avatar Maximum File Size (bytes) / Profile Picture Maximum File Size (bytes) setting. In fact - it wont even get uploaded if the pic exceeds this size. Therefore I would suggest raising this limit to an appropriate amount.

There is 1 file edit (1 line) and 1 include file.

(Im going to get pissed if someone says there is already a hack for this )

change log
-----------
Update to BETA 1.02 on 18/03/05
Added GD test
Fixed dumb typo that caused image dimensions to not be retrieved.

nJoy

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 03-31-2005, 05:57 PM
rrr rrr is offline
 
Join Date: Oct 2004
Location: California
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply, Geek.

Man, I don't know what's going on here. I commented out those lines and no luck.

I tried a png file a jpg file and a gif file, and none of them resized, I still got the dimensions to large error like it wasn't doing the shrinking at all.

I tried changing require_once('./includes/functions_geekautoavatar.php');

to the full path to that file and still nothing.

I'd almost feel better if there was SOME sort of php error that gave me a hint what to look for. But noooo, it's just being passive agressive an saying:

"That image is too large. The maximum dimensions are 48 by 48 pixels."
Reply With Quote
  #33  
Old 03-31-2005, 06:17 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rrr
Thanks for the reply, Geek.

Man, I don't know what's going on here. I commented out those lines and no luck.

I tried a png file a jpg file and a gif file, and none of them resized, I still got the dimensions to large error like it wasn't doing the shrinking at all.

I tried changing require_once('./includes/functions_geekautoavatar.php');

to the full path to that file and still nothing.

I'd almost feel better if there was SOME sort of php error that gave me a hint what to look for. But noooo, it's just being passive agressive an saying:

"That image is too large. The maximum dimensions are 48 by 48 pixels."
stick some echo commands in to see if the script is getting called and where its failing.

If you look at the code - its almost identical to the one in functions_geekarticles_images.php
In fact, all I did was port it over so I could have an easy way for users to upload avatars and profile pictures without the constant posting about 'how do I resize my picture?'.

Just every few lines in it - put
echo("Im here now- 1");
echo("Now Im here 2");
etc...
And see where you get. Other than that - I dont know what to tell you
Reply With Quote
  #34  
Old 04-01-2005, 01:20 PM
trulylowcarb's Avatar
trulylowcarb trulylowcarb is offline
 
Join Date: Apr 2004
Location: Colorado
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am having the same problems, does not resize large images and gives me the standard error, image too big. Uploading to GAS3.51 works perfectly however, and am using GD2+ image editor settings....
If you have a chance to look into the other gallery popup issue I PM'd you admin logins for, perhaps you could take a peek at this as well then... This is a much-needed upgrade for the obvious reasons you stated when you released it. Keep up the great work, Geek.
PS: Tried commenting out the GD test parts already, didn't help.
Reply With Quote
  #35  
Old 04-01-2005, 01:52 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trulylowcarb
I am having the same problems, does not resize large images and gives me the standard error, image too big. Uploading to GAS3.51 works perfectly however, and am using GD2+ image editor settings....
If you have a chance to look into the other gallery popup issue I PM'd you admin logins for, perhaps you could take a peek at this as well then... This is a much-needed upgrade for the obvious reasons you stated when you released it. Keep up the great work, Geek.
PS: Tried commenting out the GD test parts already, didn't help.
excellent. Ill look into this and find out whats up!
Reply With Quote
  #36  
Old 04-01-2005, 05:14 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool. Found out what I think the problem is with some users not getting this to work.
I would lay money on the fact that those having problems store their avatars in the DB instead of the filesystem.

So, if thats the case... try this:
edit includes/functions_upload.php and after EACH (there are 2):
PHP Code:
$maxsize = &$imagepermissions[$type 'maxsize']; 
add
PHP Code:
require_once('./includes/functions_geekautoavatar.php'); 
The problem is that the first one never gets called if you use the DB to store images. The second will catch it though!
Reply With Quote
  #37  
Old 04-04-2005, 08:24 PM
rrr rrr is offline
 
Join Date: Oct 2004
Location: California
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for posting the fix, Geek. That worked perfectly!

The autoresizer is working great on my site now.

small note:

One thing I noticed during my testing was that if the image was a grayscale GIF image, I got the following error:

Warning: imagecreatetruecolor(): Invalid image dimensions in /includes/functions_geekautoavatar.php on line 44

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /includes/functions_geekautoavatar.php on line 45

Warning: imagegif(): supplied argument is not a valid Image resource in /includes/functions_geekautoavatar.php on line 53

Warning: imagedestroy(): supplied argument is not a valid Image resource in /includes/functions_geekautoavatar.php on line 58
Reply With Quote
  #38  
Old 04-04-2005, 08:25 PM
rrr rrr is offline
 
Join Date: Oct 2004
Location: California
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek
I would lay money on the fact that those having problems store their avatars in the DB instead of the filesystem.
Just curious...is it bad to store the avatars in the DB instead of the filesystem?

I don't think it was a conscious choice I made when setting up my site. Which is better for site performance/speed?
Reply With Quote
  #39  
Old 04-04-2005, 08:33 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DB storage for images is not really a good thing.
Its the default as it gets around problems with php safemode - however it is slower and bogs your DB down more so than a file system. Saying that - its most likely only noticable in larger boards.

Ill look into the greyscale system woe. FIrst I have heard of it
Reply With Quote
  #40  
Old 04-12-2005, 11:37 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent work, thanks loads.
Reply With Quote
  #41  
Old 04-24-2005, 08:46 PM
FightRice.com FightRice.com is offline
 
Join Date: Mar 2005
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to install this, and i think it got it all installed

But then i go and test out an avatar to upload and it still tells me it is too big

Any ideas? No errors or anything like that
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07642 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete