Version: 1.00, by phlogiston
Developer Last Online: Dec 2009
Version: 3.0.0
Rating:
Released: 01-16-2004
Last Update: Never
Installs: 34
Is in Beta Stage
No support by the author.
A fairly quick and easy to install hack that attempts to check the pixel size of any images users place in their signatures. If the image is above admin set dimensions an error is given to the user explaining the valid dimensions.
I've not found a simple version of this for v3 - apologies if it's already out there somewhere!
- This is purely a BETA release as the getimagesize() function used seems to fail for certain images on one test install, unknown reason at present. This will not make the hack fail, simply some images on some servers will be allowed even if over the set size. To prevent this uncomment the five lines in the added code to give an invalid image message instead.
The options to set the size limits for signature images will be found in the admincp vBulletin Options --> User Profile Options
*****PLEASE NOTE*****
I am unable to provide any support at all for this hack - sometimes it works, sometimes it doesn't.
My knowledge dosn't reach far enough for me to understand or fix the reasons behind it failing on some installs, sorry.
If it works for you, I'm glad, if it doesn't then just revert everything and try looking at the other sig option hacks, sorry - best I can do
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
There's a problem with PHP's getimagesize(), I've run into it many times myself. I have no idea why this problem exists but some images, mainly ones I've found were saved from Photoshop, will fail to read corrently using PHP's imaging functions -- anything: getimagesize(), imagesx(), imagepng(), etc. Because of this "limitation," I've had to use X11's convert program to do my scaling, displaying, and image information. This is accomplished by a system() or exec() call and can be expensive but I've found it works 100% of the time no matter what's thrown at it. But, this is limited to a UNIX environment and assumes the vB installation has execute permission to the program convert.
Maybe a look into the ImageMagick PHP extension imagick might be worth looking at to see if this problem goes away then. But then this hack ends up with a "requirements" list.
This hack works great on 3.0.1 perfect. But on my board I also have a problem with members putting too many images in their sigs as well. I've made a very small modification to the original source that limits the total number of images and attached it for others.
There's a problem with PHP's getimagesize(), I've run into it many times myself. I have no idea why this problem exists but some images, mainly ones I've found were saved from Photoshop, will fail to read corrently using PHP's imaging functions -- anything: getimagesize(), imagesx(), imagepng(), etc. Because of this "limitation," I've had to use X11's convert program to do my scaling, displaying, and image information. This is accomplished by a system() or exec() call and can be expensive but I've found it works 100% of the time no matter what's thrown at it. But, this is limited to a UNIX environment and assumes the vB installation has execute permission to the program convert.
Maybe a look into the ImageMagick PHP extension imagick might be worth looking at to see if this problem goes away then. But then this hack ends up with a "requirements" list.
This hack works great on 3.0.1 perfect. But on my board I also have a problem with members putting too many images in their sigs as well. I've made a very small modification to the original source that limits the total number of images and attached it for others.
Can you please tell us which code was changed from the original hack so we can just upgrade what we already have?
I think this was because one of the images I tested with was under a .htaccess protected directory.. The image wouldn't be displayed to the public anyway and would be prompted to enter the name and password.
I've tested several other possibilities and it keeps coming back to this.
INSERT INTO phrase VALUES('', '0', 'setting_sigmaximages_title', 'Total Number of Images In Signature', '5000'); INSERT INTO phrase VALUES('', '0', 'setting_sigmaximagest_desc', 'The total number of images in signatures.', '5000'); INSERT INTO phrase VALUES('', '0', 'sig_image_too_many', 'The total number of images in signatures is limited to $vboptions[sigmaximages].', '1000'); INSERT INTO `setting` (varname, value, optioncode, displayorder, grouptitle, defaultvalue, advanced, volatile) VALUES ('sigmaximages', '3', '', 143, 'user', '3', 0, 0);