We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Signature Size Limiter; Sets max width/height for signatues.
Topic Started: Nov 9 2009, 12:51 AM (3,030 Views)
Mike
Member Avatar
Coda
[ *  *  * ]
Name:
Signature Size Limiter (By Mwr247)

Description:
Allows admins to set a maximum width/height on the size of user signatures, which keeps them from becoming too large and potentially distorting the page layout. Anything overt he limit will be automatically cut off, including images.

Browser compatibility:
Tested to work in IE, FireFox, Chrome, Opera, and Safari.

Preview:
ZetaBox

Installation:
Goes in your board template "Below the Board" area:
Code:
 
<style>
div.sig_sizer {max-height:250px;max-width:500px;overflow:hidden;}
</style>

<script type="text/javascript">
var td=document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td[i].className=='c_sig'){td[i].innerHTML='<div class="sig_sizer">'+td[i].innerHTML+'</div>';}}
</script>
You can set max-width and max-height to whatever value you want, or "auto" to disable. Setting overflow to auto will allow scrollbars to appear for users to see the hidden parts of the signature.
Edited by Mike, Jan 24 2017, 11:51 AM.
Offline Profile Quote Post Goto Top
 
sokor
Member
[ * ]
great code ...thanks...
Offline Profile Quote Post Goto Top
 
rampling3
Member
[ * ]
For that all you have to do it use Admin CP -.-
Offline Profile Quote Post Goto Top
 
viltniece
Member
[ * ]
Great code, only…
It also affects shoutbox, and it's not so good… Could you change the code so it doesn't affects shoutbox?
Offline Profile Quote Post Goto Top
 
Swarm
Member Avatar
Member
[ * ]
nice code :)
Offline Profile Quote Post Goto Top
 
ZenToR-ZNR
Member Avatar
Member
[ * ]
great code, thanks!

I also wanted to note that you forgot to write px behind the max-width:500.
Offline Profile Quote Post Goto Top
 
martina1977
Member
[ *  * ]
thank you
Offline Profile Quote Post Goto Top
 
WitchAssassin
Member Avatar
Member
[ *  *  * ]
I am using this and I have a new member that just posted an image in their signature that is over the limit.
Offline Profile Quote Post Goto Top
 
Helena
Member Avatar
M is for Mod

Did you make the suggested edit to this part? (Adding the missing "px")

Code:
 
<style>
div.sig_sizer {max-height:250px;max-width:500px;overflow:hidden;}
</style>
Offline Profile Quote Post Goto Top
 
WitchAssassin
Member Avatar
Member
[ *  *  * ]
Yes, Helena, I added the "px". Is there something else I'm missing?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply