Ok, here's how you limit a signature height without a plugin, thereby adding speed and decreasing CPU usage.
Open up your postbit and postbit_classic templates and find:
{$post['signature']}
Replace it with:
<span class="signature">{$post['signature']}</span>
Open up global.css or showthread.css and add:
.signature {
height:100px;
overflow:scroll;
}
You can customize it like so:
height:100px;
Change 100px top however large you want it to be.
overflow:scroll;
"scroll" will add a scroll-bar to the side so you can see the rest of the sig. You can change "scroll" to "hidden" to just cut the signature off.
Hope you find this tutorial useful.
yep and that's pretty much all you need. I wouldn't really know a "real cool way" to limit somone's signature height, so this is as good as it gets.
Instead editing direct postbit and postbit_classic templates, I would recommend to just edit "postbit_signature" template, In this template: find;
{$post['signature']}
and Change it into;
<div style="overflow: auto; max-height: 100px;">
{$post['signature']}
</div>
This will also not include the "signature separator line" in the overflow
While using max-height is a good idea, inline-styling is not. It's a lazy man's solution. CSS belong in stylesheets, not in your markup.
(2011-11-17, 07:45 AM)Yaldaram Wrote: [ -> ]Instead editing direct postbit and postbit_classic templates, I would recommend to just edit "postbit_signature" template, In this template: find;
{$post['signature']}
and Change it into;
<div style="overflow: auto; max-height: 100px;">
{$post['signature']}
</div>
This will also not include the "signature separator line" in the overflow
I think he was more suggesting that as what template to edit, not the html to use
I think a better idea would be to wrap the image in a div with the name "signature"
then in the stylesheet have:
.signature img{
max-height: 100px;
overflow: hidden;
}
Not 100% sure that it would work, just an idea. that way the image is limited but not the rest of the signature
(so it wont cut off text below the image)
If you edit postbit and postbit_classic templates then sig separator line will also include in the overflow, that wouldn't be nice IMO, sig separator should be there to let users know that sig. starts below that line.
(2011-11-17, 01:33 PM)Yaldaram Wrote: [ -> ]If you edit postbit and postbit_classic templates then sig separator line will also include in the overflow, that wouldn't be nice IMO, sig separator should be there to let users know that sig. starts below that line.
I hate the basic separator most themes use. I wrapped the sig template in fieldset tags to box the sig
(2011-11-17, 12:00 PM)faviouz Wrote: [ -> ]While using max-height is a good idea, inline-styling is not. It's a lazy man's solution. CSS belong in stylesheets, not in your markup.
And IIRC it is deprecated in css3 or something.