Current time: 09-06-2008, 09:33 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limiting Signature Dimensions
02-19-2006, 05:04 PM
Post: #1
Limiting Signature Dimensions
I *think* this is a template question?

How do I limit signature dimensions? I tried this code (that hides the 'excess' image), but it didn't work Sad

Quote:<div style="width:500;height:150;overflow:hidden;">$post[signature]</div>
Find all posts by this user
Quote this message in a reply
02-19-2006, 05:10 PM (This post was last modified: 02-19-2006 05:11 PM by Michael83.)
Post: #2
RE: Limiting Signature Dimensions
Insert the following code in your headerinclude template:
Code:
<script type="text/javascript">
function sigcheck(sig) {
if (sig.clientHeight >= 100) {
return "100px";
} else {
return "default";
}
}
</script>
After that open the settings of your theme and insert into the additional CSS box:
Code:
.signature {
height:expression(sigcheck(this));
max-height:100px;
}
Then open the template postbit_signature and replace its content with this:
Code:
<hr size="1" width="25%" align="left" />
<div class="signature">
$post[signature]
</div>
You can change the codes to fit your needs. Wink

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
Quote this message in a reply
02-20-2006, 08:11 AM
Post: #3
RE: Limiting Signature Dimensions
How about controlling the WIDTH of the sig ?
Find all posts by this user
Quote this message in a reply
02-20-2006, 10:57 AM
Post: #4
RE: Limiting Signature Dimensions
I'm not sure if that will work, so you have to test it.

Insert into headerinclude:
Code:
<script type="text/javascript">
function sigcheck(sig) {
if (sig.clientHeight >= 100) {
return "100px";
} else {
return "default";
}
}
function sigcheck2(sig) {
if (sig.clientWidth >= 500) {
return "500px";
} else {
return "default";
}
}
</script>
Then change the CSS-Code to:
Code:
.signature {
height:expression(sigcheck(this));
max-height:100px;
width:expression(sigcheck2(this));
max-width:500px;
}

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
Quote this message in a reply
03-15-2007, 03:36 AM
Post: #5
RE: Limiting Signature Dimensions
Did this work? Anyone who have tried this.
Find all posts by this user
Quote this message in a reply
07-09-2008, 03:51 AM
Post: #6
RE: Limiting Signature Dimensions
The concept is good, but it doesn't work.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: