![]() |
CSS Signature Size Enforcer
Product Name:
Signature Size Enforcer Product Description: Ever get tired of problem users with half-page long signatures and of policing signature size rules by hand? This mod might be just what you are looking for. This product wraps signatures in a <div> and forces the sig to a maximum height (in pixels) with CSS. If their sig goes over the maximum height, the sig area is limited to the specified height. Optionally, you can choose to have a vertical scroll bar displayed for the overflowing signature. This product requires no template changes or file modifications at all. It is all done automagically in the plugin. Contents: This package includes: 2 Plugin: "Add CSS code to vBulletin": Adds CSS code to the global CSS header. "Put Signature in a <div>": Wraps the signature inside a <div> with the CSS class defined above. 1 Phrase: sigsizecss: holds the CSS code to be added. In this product, it creates a class called "sizedsig" that will be used for the sig <div> 2 Option/Setting: maxsigsize: (group "Signature Sizing"): This is the maximum size, in pixels, a signature is allowed to grow. sigsizescroll: (group "Signature Sizing"): [yesno] Option to add scroll bars to the oversized signatures, or to just clip the signature. Installation Instructions: Step 1: Import the product .xml file (attached here) Step 2: Change the "maxsigsize" option to your desired maximum signature size. This number is in pixels. The default is "150". Step 3: Change the "sigsizescroll" option to yes to add scroll bars to oversized signatures, or no to just clip the region with no scroll bars. Step 4: Enjoy. Version History: version 0.9 - Initial release] version 0.91] Added option to choose scroll bars. |
very nice
< will likely install > |
Please let me know if there are any problems with this modification. The CSS has been tested on most major browsers and is "hacked" to work with quirky and standard DOMs.
Please post here if you have any problems with the CSS on a specific Browswer. The Browser AND VERSION will be needed to try to debug if any problems arise. Thanks and enjoy. |
ha, I just started working on this exact thing about 10 minutes ago, but decidewd to check and see if it was already done first.
Nice job :-) |
:) Thanks.
Wrote a bunch of little hacks in the last few months. Have some time this week so Im trying to "productize" them and release them before I get busy again. |
Nice one, i had this already manually in my style editted, but the less edits the better!
|
Perfect ...
|
Very Handy. Thank you.
|
whos a good boy then :P
|
Awesome stuff. Cheers!
|
Great! I like it
* click install |
Awesome!
|
Just one question. Is there a way to prevent users from going over the pixel height limit altogether? Like, preventing them from saving the sig if it exceeds that limit.
|
Quote:
Problem is that the sig height can display different in different browsers, various default text sizes, etc. The actual height is determined when the sig is rendered in the browser. Even if you could get that information back from the browser to the server, or limit it with a client-side script, it is not guaranteed to be the same height in other's browsers. For instance, a user could shrink their default text size to the smallest setting and save their really long sig under those settings. Everyone with normal text size would have a much larger sig displayed. Hope that makes sense. |
Quote:
*clicks install* |
:) This is similar to the modification I released a couple of days ago but have been doing for years on my forum:
Prevent Oversized Images Breaking Message Tables With yours, however, it comes equipt with a nice plugin. Cool to know that many of us want similar features. :) |
Great mod!
Any way this could limit width as well? |
Quote:
Quote:
On first thought, maybe by adding a "max-width:" setting in the phrase holding the CSS. Maybe something like: Quote:
Quote:
Good luck and let me know how it goes. |
Opera have always given me the most problems when CSS is concerned. Props to you sinaluna on a great mod and support. :)
|
Coolest. Hack. Ever. :p
Well, maybe not coolest, but definitely up there. If you use this in combination with the "Extended Signature Limits" hack, you can control almost all aspects of the signatures... if they find a way to break your line limit, tada! Nice work. |
Quote:
Quote:
|
not bad idea but i dont like the idea of that bar being in the signature.
|
Quote:
|
To simply cut it off just replace "auto" with "hidden".
|
Hmmm, I can make this an vBulletin option to either add scrolls or just cut it off. Let me think about it. Would anyone use this if I added it?
|
I think it'll be a good idea. With my mod, by default the oversized signature area is cut off. To add a scrollbar users have to edit the template. Since your version is via plugin and Admin CP intergrated people could really benefit from it as it gives them options.
|
Just uploaded version 0.91 which adds an option to choose whether or not to display scroll bars on oversized signatures. Thanks to Freesteyelz and others for the suggestion.
As always, please let me know if there are any problems or suggestions on this product. Hope you enjoy it. |
Can this be modified to do Height / Width?
|
Quote:
|
Good plugin!
I'd like to add my vote for width support. I added it in myself using this code for sizedsig (width limited to 500 pixels): Code:
<style> |
Installed. Thanks for this.
|
Quote:
|
Clicked Install with a huge smile on my face! Worked perfect right out of the box. Thank you very much for such a useful and timesaving plugin.
This takes care of having to manage member signature size. Awesome plugin and very easy to install. |
Uh oh. I found out recently that the expression tag causes some versions of IE to crash. Some of my users have experienced this behavior. Removing the expression tags fixes the crash, but leaves the sig-size as unlimited. Any suggestions?
|
hi
Quote:
thanks |
Do you mean where to modify them? Those are accessable from your admincp under vBulletin options -> Signature Sizing
|
Ok i tried to do it myself but i dont know how.
I want to add it so that at least a usergroup is excluded from the signature being resized. I tried to add in the postbit_complete one and parse_templates. $ignore_groups = split(',', $vbulletin->options['siggroupexception']); if(!is_member_of($vbulletin->userinfo, $ignore_groups) ) { sigcode here } Anyone know what how i would go about doing this. siggroupexception is a new option <setting varname="siggroupexception" displayorder="30"> <datatype>free</datatype> <defaultvalue>5,6,7</defaultvalue> </setting> I put that in. If anyone could help that be great. Thanks. |
Great thanks!
I had done something similar on my old version of vB and lost all mu custom stuff when I finally upgraded to the latest version this week. This saves me time as I don't have to do it again, and the "product" format is nice and clean. |
Just got this running. Lush!! Thanks a lot, feels really nice!
|
|
All times are GMT. The time now is 05:26 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|