2010-05-14, 09:13 AM
Many people like myself are annoyed by massive signatures and the character limit settings do little to prevent people from posting large images so here is an easy way to ensure your users signature aren't bigger than whats allowed by limiting the dimensions of the signature div.
First go ACP > Templates & Styles > Templates > Select Template > Post Bit templates > postbit and find the following code:
Next go back to the template list and open the postbit_classic template and do the same, finding {$post['signature']} and enclosing it in a div just like the code above.
Thats it, your done! Anything bigger than 150px will simply be cut off and hidden!
Variations
To change the height limit you can simply change 150px to your own value, you can also change the width by adding width: 500px; after overflow: hidden;
The height property will always make the signature div that size so if you would prefer to allow any height up to the limit then you can substitute height with max-height, though I think some browsers have issues with this.
You can also put the CSS in the style sheet rather than inline by using this code instead:
Here is a print screen of the result:
[attachment=18292]
First go ACP > Templates & Styles > Templates > Select Template > Post Bit templates > postbit and find the following code:
{$post['signature']}
then simply put a div tag with a limited height and hidden overflow like this:<div style="height: 150px; overflow: hidden;">
{$post['signature']}
</div>
Next go back to the template list and open the postbit_classic template and do the same, finding {$post['signature']} and enclosing it in a div just like the code above.
Thats it, your done! Anything bigger than 150px will simply be cut off and hidden!
Variations
To change the height limit you can simply change 150px to your own value, you can also change the width by adding width: 500px; after overflow: hidden;
The height property will always make the signature div that size so if you would prefer to allow any height up to the limit then you can substitute height with max-height, though I think some browsers have issues with this.
You can also put the CSS in the style sheet rather than inline by using this code instead:
<div class="sigdiv">
{$post['signature']}
</div>
and adding the following to global.css:.sigdiv{
height: 150px;
overflow: hidden;
}
Here is a print screen of the result:
[attachment=18292]