vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - Control signatures height per pixel with CSS (https://vborg.vbsupport.ru/showthread.php?t=197825)

Mazinger 12-01-2008 10:00 PM

Control signatures height per pixel with CSS
 
1 Attachment(s)
This mod will help you determine a fixed height for signatures in posts with CSS to prevent members from having a large annoying signature. (it will cut from the signature and hide the rest of it) - screenshot attached.

Long signatures and signatures with alot of images will not be an issuse anymore!


INSTALLATION


EDIT postbit OR postbit_legacy (which you use) and search for:

HTML Code:

$post[signature]
Replace it with

HTML Code:

<div class="fixedsig">$post[signature]</div>
Then go to the style option and add these lines in the CSS

HTML Code:

.fixedsig {
max-height:250px;
height:expression((document.documentElement.clientHeight) > 250? "250px" : "100%");
overflow:hidden;
}

You can change the 250 to the height you want (per pixels)

And you're done!


SUPPORT


Please click Mark as Installed if you want to get support for this mod.

Leo Brazil 12-03-2008 10:26 AM

Great idea. I going to check this out.

TomJames 12-12-2008 03:17 PM

Awesome.

Mazinger 12-12-2008 03:31 PM

If you have installed it, then click Mark as Installed please. :)

TomJames 12-12-2008 06:36 PM

Just finished installing it, works perfectly and very easy to install. Thanks.

Mike08 12-27-2008 11:18 PM

Thanks!!! It works! ;)

I needed a code to modify the width of the signature. So with your permission I have adapted to modify the code in height and width.

Here it is. Example with 800x300px.

HTML Code:

.fixedsig {
max-width:800px;
width:expression((document.documentElement.clientWidth) > 800? "800px" : "100%");
overflow:hidden;

max-height:300px;
height:expression((document.documentElement.clientHeight) > 300? "300px" : "100%"); }


Mazinger 12-28-2008 12:57 PM

Well, I could add a width control too, but I decided to leave it to image resize mods; they would give better results for width control.

Mike08 12-28-2008 08:01 PM

I have the ncode image resizer installed but don't work in signatures images. I think the best way to have a well-organized forum :D.

I have users who have reached 1,200px width pictures in signatures :eek:

And vBulletin can only limit the size of attached images, not the bbcodes.

Anyway, thanks again :up:

Boosted Panda 12-30-2008 09:02 PM

Great one Ill try this later!

RocCityDad 01-19-2009 06:39 PM

Hi I am new to vbulletin.. where do I go to make this edit.. thanks

RocCityDad 01-19-2009 06:53 PM

i don't think I did it right... not working

Mazinger 01-20-2009 06:37 PM

Are you sure you applied my instructions correctly?

yingzhou 01-31-2009 12:21 PM

If I don't want to hide it, how can I add the scrollbar to the last part?

Mazinger 01-31-2009 09:09 PM

Quote:

Originally Posted by yingzhou (Post 1729876)
If I don't want to hide it, how can I add the scrollbar to the last part?

Change overflow:hidden; to overflow:scroll;

HolyKiller 02-08-2009 05:13 PM

I'm using 6 skins on my forum. One is default skin, the other four are from eXtreme pixels, and the last one is free skin Pro Bangla ( from vbulletin.org -> HERE ).

This signature restriction works perfectly on the fist five skins (default and eXtremepixels skins) BUT, it doesn't work with ProBangla skin. I am rly confused.

In CSS i have (like in other's five skins)
Code:

/* ***** Signature Cut ***** */
.fixedsig {
max-height:100px;
height:expression((document.documentElement.clientHeight) > 100? "100px" : "100%");
overflow:hidden;
}

and in postbit_legacy (again, "like in other skins")
Code:

<div class="fixedsig">$post[signature]</div>
Can anyone please help me, what i can do with this?

Thanks a LOT

Holy

Mazinger 02-09-2009 02:17 AM

PM me with your forum admin access and I'll have a look myself.

HolyKiller 02-09-2009 08:42 AM

Quote:

Originally Posted by Mazinger (Post 1738284)
PM me with your forum admin access and I'll have a look myself.

Funny, but ok, i'll send you access to test forum :)

Check your PM

trotskid 03-01-2009 10:48 AM

Quote:

Then go to the style option and add these lines in the CSS
Hi, where exactly can I modify that?

Thanks ;)

Mazinger 03-01-2009 11:32 AM

Look at this:
http://www.vbulletin.com/docs/html/m...css_additional

trotskid 03-01-2009 12:21 PM

Thank you Mazinger!

It´s posible to limit also the width?

Greetings

Mazinger 03-01-2009 06:35 PM

I would recommend using an image resizer mod for this.

trotskid 03-01-2009 06:53 PM

ImageResizer don?t works very well on my forum (3.8.1) :S. Instead of this I use Resize IMG tag with Highslide but only for images.

Thanks anyway, and thanks also for this hack ;)

HolyKiller 03-09-2009 10:22 AM

Quote:

Originally Posted by Mazinger (Post 1757773)
I would recommend using an image resizer mod for this.

This is 100% better cos this restriction crop (or scrool) EVERYTHING, not only IMG tags. Even texts, hyperlinks, quote/code bars ... everything. So the signature is strictly cut everything larger than XXX px.

Love this hack :p

Mazinger 03-09-2009 09:11 PM

Love your comment too. ;)

Pteppic 03-28-2009 09:59 PM

1 Attachment(s)
I'm getting different problems with IE and Firefox. In the former, the signatures that are within the limit are stretched to fit it. This is not a problem in Firefox, although youtube videos embedded in signatures (by specialised bbcode) bleed over into the post below (or whatever's there). I suppose the embedding html overrides the mod somehow, but as a complete CSS noob, I haven't a clue how to fix it, and the IE stretching thing I can't figure out at all. (Screenshots attatched)

Mazinger 03-29-2009 02:11 PM

I think my mod have no control over flash objects in Firefox, may be there's something that can be done to solve it - I don't it now, sorry!

Pteppic 03-29-2009 06:36 PM

Well, necessity is the mother of invention :p , and I managed to find some solutions on my own - I set the wmode parameter in the embedding code to opaque and used "this.scrollHeight" in the css instead of "(document.documentElement.clientHeight)".

Mike08 04-12-2009 09:23 PM

Quote:

Originally Posted by trotskid (Post 1757524)
Thank you Mazinger!

It?s posible to limit also the width?

Greetings

Quote:

Originally Posted by Mike08 (Post 1695146)
Thanks!!! It works! ;)

I needed a code to modify the width of the signature. So with your permission I have adapted to modify the code in height and width.

Here it is. Example with 800x300px.

HTML Code:

.fixedsig {
max-width:800px;
width:expression((document.documentElement.clientWidth) > 800? "800px" : "100%");
overflow:hidden;

max-height:300px;
height:expression((document.documentElement.clientHeight) > 300? "300px" : "100%"); }


Here it is :D

****IMPORTANT: Place this code at very top of CSS.

EvilJohn 04-26-2009 05:05 PM

Thank you. Works very well. :up:

HayleyP 08-17-2009 06:38 AM

I used the "scroll" instead of "hidden" but how do I make it so if the signature is the right size, you can't see the scroll bars?

valendono 08-17-2009 10:53 AM

it is max-height is valid css for ie, ff or any else browser ? I dont max-height is global css variables, some browser cant read it.

triff 06-12-2010 03:55 PM

Is it possible to change the limitation from px to % or something that change with the users screen resolution? As it is it will look quite different depending on your screen resolution.

SGL.

KID_1194 06-19-2010 05:14 AM

This is awesome .. thaks a lot Mazinger !

BUDIMAN 10-05-2012 12:26 PM

Work perfectly...tq

Mazinger 03-20-2013 01:35 PM

You're welcome all.


All times are GMT. The time now is 10:06 AM.

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.01548 seconds
  • Memory Usage 1,786KB
  • 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
  • (2)bbcode_code_printable
  • (5)bbcode_html_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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