The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Auto Resize Image Attachments (Avatars & Profile Pic Too).... Details »» | |||||||||||||||||||||||||||
Auto Resize Image Attachments (Avatars & Profile Pic Too)....
Developer Last Online: Oct 2010
Gone
Show Your Support
|
Comments |
#2
|
||||
|
||||
|
#3
|
||||
|
||||
That's awesome - this is something I've been looking for for ages
Question: is it an easy thing to add this feature (maybe make your functionality into a standalone function?) into the Avatar upload and Profile pic upload functions ? |
#4
|
||||
|
||||
Thanks muchly! This was the one final hack I was waiting for from my ol' vB2 - I looked into it a couple times, but never had the patience
|
#5
|
|||
|
|||
Does any one knows if it works in PHP in safe mode??
|
#6
|
|||
|
|||
I installed it and I hope it's working
(It's working, thank you so much ) |
#7
|
||||
|
||||
Very cool and useful hack. A lot of members are clueless when it comes to image resizing. This is a great idea.
|
#8
|
|||
|
|||
Quote:
Warning: Division by zero in /home/website/www/forum/includes/functions_file.php on line 318 Warning: Division by zero in /home/website/www/forum/includes/functions_file.php on line 319 Warning: Division by zero in /home/website/www/forum/includes/functions_file.php on line 327 Warning: Division by zero in /home/website/www/forum/includes/functions_file.php on line 328 Warning: imagecreatetruecolor(): Invalid image dimensions in /home/website/www/forum/includes/functions_file.php on line 331 and then: IMG_0541.JPG: File Too Large. Limits are 640 x 480. Your file is 1600 x 1200. So far not working, I don't know if it the safe mode.. |
#9
|
|||
|
|||
There seems to be a problem with the avatar upload feature. If I set avatars to no more than 20K, but photos to 150K, it uses the 150K limit for avatars.
|
#10
|
|||
|
|||
For files that are too big (in K), I would still like to see it try and resize them -- then see if they come under the file size limit.
|
#11
|
||||
|
||||
Getting similar error message, just installed GD 2.0.23
---------- begin error msg -------------------- Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 44 Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 45 Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 53 Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 54 Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in /var/www/html/forums/includes/functions_file.php on line 57 ----------- end error msg --------------- -- line 44 -- $width_factor = $w / $maxattachwidth; -- line 45 -- $height_factor = $h / $maxattachheight; -- line 53 -- $nw = round($w / $height_factor); -- line 54 -- $nh = round($h / $height_factor); -- line 57 -- $ni=imagecreatetruecolor($nw,$nh); |
#12
|
||||
|
||||
The issue with the deviding by zero in this hack is that you overlooked the fact that the hack does not define what $maxattachwidth & $maxattachhieght are... so besure to add those values to be edited in the admin panel....
^_^ by the way I coded the original version of this hack for vB2, look in the beta section for it, it should help you with some of the bugs in this one... FYI: Safemode shouldnt affect this scrpt as long as its not writing on to the filesystem. Also it helps to cache the resized images because trust me doing it on the fly will bog down the system in the long run. Oh, I almost forgot if you have any questions feel free to send me a PM. |
#13
|
||||
|
||||
<a href="http://www.offshoreonly.com/phpinfo.php" target="_blank">http://www.offshoreonly.com/phpinfo.php</a>
|
#14
|
||||
|
||||
Quote:
to mini: try to test for GD2 within the script with a function check on imagecreatetruecolor and if it fails then make it use imagecreate instead because it is compatible with all versions of GD so it will 1) make sure that the forum wont have errors in exchange for uglish images and 2) makes your hack compatible with earlier versions of PHP |
#15
|
||||
|
||||
i get this error
Quote:
|
#16
|
||||
|
||||
alrite, adding require_once('./includes/functions_image.php'); worked
|
#17
|
|||
|
|||
I uploaded everything, and modified everything, but the images aren't resized?
|
#18
|
|||
|
|||
Designed for: vBulletin 3.0.3 on a Linux server with PHP 4.3.8 and GD 2.0.23. PHP not in safe mode and attachments stored in the database. May work in other cases, but I can't guarantee that.
I had install it, but it didn't work for me. |
#19
|
|||
|
|||
Quote:
I didn't get anything wrong, but I the size of the photo that attachment is not getting resize. 2. yes I had set the max attachment sizes 3. No, I don't have a php.info file For set max attachment sizes, if we set it smaller than the photo size, after we attachment to the post , it will be resize to me equal the max attachemt sizes right? |
#20
|
||||
|
||||
Actually, there is a vB3 option to allow public viewing of phpinfo()...
|
#21
|
|||
|
|||
Didnt work for avatars, everything else i dunno...
|
#22
|
||||
|
||||
Using on vBulletin v3.0.3 with safe mode enabled in PHP and is working fine. The only other modification I had to do was to add
Code:
require_once('./includes/functions_image.php'); |
#23
|
||||
|
||||
works great at - www.xamira.net since the avatar is on the homepage thanks alot!!
|
#24
|
|||
|
|||
I modded it slightly so that it resizes any image larger than the file limit or the dimensions limit.. However as stated, it probably does increase load on the server. The other problem is users are uploading photos like crazy now.
|
#25
|
|||
|
|||
any idea when why when I upload an image that is 800k or abovr it fails. no errors just the upload page turns white with no writing on it.
also in the file you recomended changing uploading to uploading and resizing attachments and I cant find that do you know where I could find that. |
#26
|
||||
|
||||
Hello,
first, thank you for this nice hack. But, I have a Problem. :disappointed: The uploaded picture is "darker" than the original one. attachment 1: original attachment 2: uploaded in my forums gd version: 2.0.12 Can you help me? :ermm: |
#27
|
|||
|
|||
same here.
|
#28
|
|||
|
|||
I still get the error That image is too large. The maximum dimensions are 220 by 220
vbulletin 3.0.3 Running on PHP Version 4.3.4 I only modified the functions_upload.php No other errors are displayed...I can upload smaller images that are with in the 220 by 220 spec. |
#29
|
||||
|
||||
Quote:
|
#30
|
|||
|
|||
Where and how do I do the phrase change? I'm n00b at this.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|