![]() |
Quick Sig Image Size Limiter
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 :( |
Sounds great, im sure some boards will need this due to people abusing Sig's with pics. Nice one and thank you, Oh and congrats on your first release :)
|
Nice hack, except there's a problem with the instructions. The 'settings' query is screwed up.
Replace: Code:
INSERT INTO setting VALUES ('sigmaxwidth', '480', '', '141', 'user', '640', '0', '0'); Code:
INSERT INTO `setting` VALUES ('sigmaxwidth', 'user', '500', '500', '', 112, 0, 1); |
Quote:
& glad it's working fine for you. :) and MindTrix, thank you too, first release is rather nerve-racking! |
Nice to see this released, it'll come in handy for my site.
|
Wow, thanks. I really need this one :) I'm really hoping this works!
|
Installed on RC 2, Works Great, Thanks
Peace |
One more suggestion if it is even possible. I have one user (so far) that linked to a HUGE animated [img]. Is there a way to make this limit total file size as well?
|
Looks good. I'll give it a shot. Thank you. ;)
|
works great, just what i wanted
/me clicks install |
now members have links insted of the pics
|
Hmm.. it's not working for me at all. : ( I'm using RC4. When I update my signature, it doesn't show a warning. Can anyone help me? Thanks :D
btw - i'm not sure what you mean by "uncomment"? :x |
didnt work for me on rc2. when i submit a new sig, it just never refreshes the page. I put my origial profile.php back on server, and page loaded fine. did that 2-3 times.
|
This is great. It would definitely be a big help for it to also limit file sizes.
|
does not work on rc4 as i have found out :P
|
I like the idea.. and may use the mod.. :) thanx
|
I'm gonna wait till gold version comes out before updating this as it seems to still work fine for me so it's obviously a compatability issue that isn't showing itself on first glance - I'll also add filesize checking at the same time.
|
can u please do a quick one for rc4 because i won't be updating straight away :$
can't be that hard can it ? its only 2 lines in the database |
This works perfectly fine in RC4. I've been using it since RC4 was released.
|
Will this work with vBulletin 3.0 FINAL?
|
phlogiston, Thanks for this -- my board is completely out of control with sigs. My mods will love you if this works! I am going to install it tonight.
:) Edit to add: Installed and works like a charm. As written, it adds a link instead of the image for sizes that are too large. Uncommenting the allowimgsizefailure error message logic gives an error message when trying to submit a new sig with a pic too large. Perfect! :D Oh, and a note for those who tried this and said it didn't work, before you give up -- make sure that you are going through your UserCP to change your sig and not the ACP or MCP. Sig limit checking by the profile.php file is only done in the UserCP. :) |
i can also confirm this works on vb3 gold
|
was just wondering if u could make the signature options more comprehensive
like for example this pic i did try posting elsewhere but the thread got ignored but since this threads all about that kind of thing its best to ask here i guess Pic |
COOL~ works perfectly with gold
robin_ge clicks install |
Just download and installed with my vB3 Gold. Works great!
Nice addition would be to limit the number of images in a signature as well! That would be sweet!! Even if not, GREAT JOB and GREAT HACK! |
I would like to see a weight check as well. most of my users have heavey images rather than too big.
|
Mmmhh... Great hak, but... Is it possible to add a feature to limit the number of images in a signature? For example:Select that User can insert in the signature only one image, or only two, depending by the value choosen by admin in admin cp.
Is it possible to make it? :) |
Installed ;)
Any Chance to see a check for imagesize in kb as well? |
kewl hack.. going to intsall it late.. thanks
|
Keep up the good work! I hope this becomes final.
|
It appears to work for some images and not others..
Any idea why this is the case? |
Which images are you having a problem with?
|
Working great on 3.0.0 without any problems!
Any plans to take this out of Beta? |
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. |
hogarth: does that include smilies too? if so, anyway that, that could be removed?
D |
Quote:
|
Quote:
I've tested several other possibilities and it keeps coming back to this. |
Quote:
|
Quote:
|
figured it out all by myself.
PHP Code:
|
All times are GMT. The time now is 05:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|