• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Limit signature size ?

#4
Try adding something like this to EXTRA.css:

Code:
.message .signature {
max-height: 100px;
overflow-y: auto !important;
}
Change the values to suit.
This works well for me too :)
I just have one question. Is there a way to cut it off and make the signature not scrollable? Then it wouldn't have to load tons of text and links, this would be an easy antispam if you know how to do this.
 

dieketzer

Well-known member
#8
to expand a bit...
the above code will only apply to the sig visible in the message. it wont alter the sig in their profile, nor will it affect the signature creation preview.

for sig in message and also sig in profile:
Code:
/* limited sigs */
.signature
{
max-height: 105px;                    /* adjust as needed */
opacity: 0.6;                         /* means 60% opacity. 0.6 is partially transparent - 1.0 is no transparency at all */
padding: 0px;
overflow:hidden;
overflow-y: hidden !important;  /* old ie fix */
overflow-x: hidden !important;  /* old ie fix */
}
to also affect the signature preview you need to make a template edit.
in template account_signature_preview:

change this line
Code:
<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
like so:
Code:
<div class="messageText primaryContent baseHtml signature">{xen:raw $signatureParsed}</div>
 
#9
to expand a bit...
the above code will only apply to the sig visible in the message. it wont alter the sig in their profile, not will it affect the signature creation preview.

for sig in message and also sig in preview:
Code:
/* limited sigs */
.signature
{
max-height: 105px;                    /* adjust as needed */
[COLOR=#000000]opacity: 0.6;[/COLOR]                                /* means 60% opacity. 0.6 is partially transparent - 1.0 is no transparency at all */
padding: 0px;
overflow:hidden;
overflow-y: hidden !important;  /* old ie fix */
overflow-x: hidden !important;  /* old ie fix */
}
to also affect the signature preview you need to make a template edit.
in template account_signature_preview:

change this line
Code:
<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
like so:
Code:
<div class="messageText primaryContent baseHtml signature">{xen:raw $signatureParsed}</div>
What is opacity for? I mean the signatures them selves are solid images...
 
#14
I edited this here:
<edited this out, took a lot of space>
So how can I get this to preview in the signature preview too?

And did I copy that right? I copied the "{"s the first time but it messed up the format of the whole page...
 

MagnusB

Well-known member
#17
I think it should work through style properties, as long as it pertains to the correct CSS rule. It could be easier to just do it through EXTRA.CSS

Code:
.signature {
  max-height: 150px;
  opacity: 0.6;
  overflow: hidden;
}
As for the preview, I checked it. There is no sane way to do it through CSS rules, you need to do an template edit. Open account_signature_preview, find
HTML:
<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
Change to:
HTML:
<div class="messageText primaryContent baseHtml" style="max-height: 150px; opacity: 0.6; overflow; hidden;">{xen:raw $signatureParsed}</div>
EDIT: Corrected one small error

EDIT 2: Indeed I did forget overflow: hidden, edited it in
 
#18
I think it should work through style properties, as long as it pertains to the correct CSS rule. It could be easier to just do it through EXTRA.CSS

Code:
.signature {
  max-height: 150px;
  opacity: 0.6;
}
As for the preview, I checked it. There is no sane way to do it through CSS rules, you need to do an template edit. Open account_signature_preview, find
HTML:
<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
Change to:
HTML:
<div class="messageText primaryContent baseHtml" style="max-height: 150px; opacity: 0.6;">{xen:raw $signatureParsed}</div>
EDIT: Corrected one small error
Yeah I think this will work too. It's strange that I get slightly different results from the preview than on the forum... like text is smaller on the forum thread lol.
 

MagnusB

Well-known member
#20
As you see, the preview is defined with different classes. If you have changed the font size in the signature, you might want to take that into account. If you have a test account and are comfortable with PMing me the details, I can take a look at it for you.