RE: Signature Size Limit
January 24, 2017 at 10:03 am
(This post was last modified: January 24, 2017 at 10:10 am by bennyboy.)
(January 23, 2017 at 11:27 am)Tiberius Wrote:(January 23, 2017 at 9:56 am)emjay Wrote: Eta: But I agree with Chad... I would prefer if they were limited in size as well, such that they didn't have their own individual vertical scrollbars... because that's what messes up the scrolling with the mouse wheel; with signatures shorter than that, there's no problem.
It shouldn't mess up scrolling if your cursor is positioned off to the side, depending on what OS you are using I suppose.
The problem with imposing limits is it's extremely difficult to actually impose them. Number of lines we can do, but image sizes...not easy to determine because the image loads after the rest of the page, so we'd have to involve some JavaScript checks. Then what happens if someone posts 2 images just under the allowed height? We'd have to resort to manually checking and removing images from signatures. I'd rather have the staff put their efforts into post moderation, especially when you can disable signatures.
Pretty sure jQuery will allow you to measure the total height of a div, no matter what's in it, and I'm pretty sure I could do it in an afternoon. Basically, I'd scale all images and text down to fit a particular max height of div. If someone wants their text wall to look like a postage stamp, then that can be up to them.
http://api.jquery.com/height/
Edit: just a hint, the div in which sigs lie has the css class name "signature scaleimages" which indicates to me that MyBB already has this feature built-in.