vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Limit signature height via CSS (https://vborg.vbsupport.ru/showthread.php?t=272700)

HolyKiller 10-23-2011 10:00 PM

Limit signature height via CSS
 
1 Attachment(s)
This tiny hack will strictly limit signature height. It will take ALL things what the user have in the signature (no matter what is it ... text, image, video, code ... ) and it will crop it based on choosed value.

Original hack was made by Mazinger, but it was a bit outdated and it didn't work for IE7, so there is a newone for vB 4.x :)


Installation:
Styles & Templates -> Style Manager -> Edit Templates -> edit additional.css

add following code:
Code:

.signaturecontainer {
max-height:200px;
_height: expression(this.scrollHeight > 200? "200px" : "auto" );
overflow:hidden;
}

Change the red number to anything you want :]

HolyKiller 10-24-2011 06:09 PM

reserved

wally07 10-28-2011 05:43 AM

Just what I was looking for! Thank you!!!

Scans007 11-01-2011 03:05 PM

Worked like a charm in vB 4.x - I tried like 6 plugins from all diff versions....this was so simple

Thanks so much!!

WorldCraft 11-06-2011 10:30 PM

Perfect! :)

rfranklin 12-19-2011 01:11 PM

Awesome! This will be very helpful. Thanks!

acast 01-11-2012 01:45 PM

Is any possibility of adding a scroll bar to the signature to see if we want the rest of the signature?

Like this old hack:
https://vborg.vbsupport.ru/showthrea...gnature+scroll

HolyKiller 01-18-2012 04:27 PM

2 acast: Yes, just use
Code:

overflow:auto;
and it will show scrollbars if the signature larger that specified limit :]

acast 01-18-2012 05:04 PM

Quote:

Originally Posted by HolyKiller (Post 2289457)
2 acast: Yes, just use
Code:

overflow:auto;
and it will show scrollbars if the signature larger that specified limit :]

Thanks for your help, man ;)

cvalk 04-16-2012 04:36 PM

Thanks for this mod. I opted to use a scrollbar if the signature exceeds the permissable size and to disable the horizontal scroll. Here is the code in case it is useful to anyone else:

Code:

overflow: auto;
overflow-x: hidden;


Emeralda 04-16-2012 05:42 PM

I'm guessing there's no way to make it so opening a spoiler would increase the box automatically, instead of cutting it and using the overflow?

HolyKiller 04-26-2012 11:37 AM

Theoretically it shoudn't be a problem. It depends on your specific spoiler tag. Send me a source and i'll try to add a part which will override signature CSS :]

kappeGF 04-26-2012 02:00 PM

Is any possibility to setting this mod for specify usergroup?

BUDIMAN 10-05-2012 12:29 PM

Worked like a charm

Toshinobu 10-10-2012 06:07 PM

Works on 4.2 :) Thank you!

legiondadon 10-18-2012 05:51 AM

4.2 doesnt work nothing seems to happen..i have eTiKeT 2011 Postbit_Legacy installed

trophiesonpsn 02-12-2013 05:30 PM

Any idea what effect this might have on a spoiler bar opened to reveal content larger than the space allowed?

jokergameth 04-12-2013 01:10 PM

Works great with my vb4.1.5
Thank you /bow

Dave 04-13-2013 11:43 AM

A better alternative, with a scroll bar, would be:
Code:

.signaturecontainer {
  max-height: 300px;
  overflow-x: hidden;
  overflow-y: auto;
}

It's always smart to avoid expressions in CSS.

Dstephan 01-25-2014 12:27 AM

Quote:

Originally Posted by Superwaffle (Post 2416098)
A better alternative, with a scroll bar, would be:
Code:

.signaturecontainer {
  max-height: 300px;
  overflow-x: hidden;
  overflow-y: auto;
}

It's always smart to avoid expressions in CSS.

This works well - but it adds a scroll bar to see the rest of the sig - I'd rather the sig just cut off so it looks bad and they want to change it. Is there a way to eliminate the scroll?

Dave 01-27-2014 08:31 PM

Quote:

Originally Posted by Dstephan (Post 2476731)
This works well - but it adds a scroll bar to see the rest of the sig - I'd rather the sig just cut off so it looks bad and they want to change it. Is there a way to eliminate the scroll?

You change the overflow values to hidden.

RaiinbowEyes 02-02-2016 02:29 AM

Works on v 4.2.2 :) Thank you so much, trying to let our users have freedom with signatures has lead to a nightmare of trying to also keep the size of signatures in check, this is perfect!

Only issue so far is it doesn't seem to work on Firefox. Works on Chrome and Safari, though. I'm using Firefox ESR so that may have something to do with it. I'm trying to find friends who have the regular Firefox to test it and see if it works for them.


All times are GMT. The time now is 05:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01165 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete