Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CSS Signature Size Enforcer Details »»
CSS Signature Size Enforcer
Version: 0.91, by sinaluna sinaluna is offline
Developer Last Online: Jul 2011 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 03-14-2006 Last Update: 03-19-2006 Installs: 178
Uses Plugins
 
No support by the author.

Product Name:
Signature Size Enforcer

Product Description:
Ever get tired of problem users with half-page long signatures and of policing signature size rules by hand? This mod might be just what you are looking for.

This product wraps signatures in a <div> and forces the sig to a maximum height (in pixels) with CSS. If their sig goes over the maximum height, the sig area is limited to the specified height. Optionally, you can choose to have a vertical scroll bar displayed for the overflowing signature.

This product requires no template changes or file modifications at all. It is all done automagically in the plugin.

Contents:
This package includes:
2 Plugin:
"Add CSS code to vBulletin": Adds CSS code to the global CSS header.
"Put Signature in a <div>": Wraps the signature inside a <div> with the CSS class defined above.

1 Phrase:
sigsizecss: holds the CSS code to be added. In this product, it creates a class called "sizedsig" that will be used for the sig <div>

2 Option/Setting:
maxsigsize: (group "Signature Sizing"): This is the maximum size, in pixels, a signature is allowed to grow.

sigsizescroll: (group "Signature Sizing"): [yesno] Option to add scroll bars to the oversized signatures, or to just clip the signature.

Installation Instructions:

Step 1: Import the product .xml file (attached here)

Step 2: Change the "maxsigsize" option to your desired maximum signature size. This number is in pixels. The default is "150".

Step 3: Change the "sigsizescroll" option to yes to add scroll bars to oversized signatures, or no to just clip the region with no scroll bars.

Step 4: Enjoy.

Version History:
version 0.9 - Initial release]
version 0.91]
Added option to choose scroll bars.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-15-2006, 12:58 PM
Doc Great's Avatar
Doc Great Doc Great is offline
 
Join Date: Jan 2005
Location: Stuttgart
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great! I like it

* click install
Reply With Quote
  #13  
Old 03-15-2006, 06:22 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome!
Reply With Quote
  #14  
Old 03-15-2006, 07:05 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just one question. Is there a way to prevent users from going over the pixel height limit altogether? Like, preventing them from saving the sig if it exceeds that limit.
Reply With Quote
  #15  
Old 03-15-2006, 09:49 PM
sinaluna sinaluna is offline
 
Join Date: Feb 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Is there a way to prevent users from going over the pixel height limit altogether? Like, preventing them from saving the sig if it exceeds that limit.
Short Answer: not really.

Problem is that the sig height can display different in different browsers, various default text sizes, etc. The actual height is determined when the sig is rendered in the browser. Even if you could get that information back from the browser to the server, or limit it with a client-side script, it is not guaranteed to be the same height in other's browsers.

For instance, a user could shrink their default text size to the smallest setting and save their really long sig under those settings. Everyone with normal text size would have a much larger sig displayed. Hope that makes sense.
Reply With Quote
  #16  
Old 03-15-2006, 11:47 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sinaluna
Short Answer: not really.

Problem is that the sig height can display different in different browsers, various default text sizes, etc. The actual height is determined when the sig is rendered in the browser. Even if you could get that information back from the browser to the server, or limit it with a client-side script, it is not guaranteed to be the same height in other's browsers.

For instance, a user could shrink their default text size to the smallest setting and save their really long sig under those settings. Everyone with normal text size would have a much larger sig displayed. Hope that makes sense.
Dang. Well then, its not exactly what I want, but its the closest thing I've seen yet!

*clicks install*
Reply With Quote
  #17  
Old 03-16-2006, 12:06 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is similar to the modification I released a couple of days ago but have been doing for years on my forum:

Prevent Oversized Images Breaking Message Tables

With yours, however, it comes equipt with a nice plugin. Cool to know that many of us want similar features.
Reply With Quote
  #18  
Old 03-16-2006, 01:08 AM
lordofgun lordofgun is offline
 
Join Date: Jan 2002
Posts: 285
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod!

Any way this could limit width as well?
Reply With Quote
  #19  
Old 03-16-2006, 01:34 AM
sinaluna sinaluna is offline
 
Join Date: Feb 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
This is similar to the modification I released a couple of days ago but have been doing for years on my forum:
Hey, very cool. I had a heck of a time getting IE, Opera and Firefox all to play well with the overflow settings. Ill have to take a look at how you did it and see if I missed anything.

Quote:
Any way this could limit width as well?
Sure, you could make it work. The reason I didn't add it here is that setting it to an absolute max is a problem in some styles. The flow of the thread is vertical so it was not a big deal to limit it in that direction. People run their browsers in many different widths, so you could introduce some strangeness.

On first thought, maybe by adding a "max-width:" setting in the phrase holding the CSS. Maybe something like:

Quote:
.sizedsig {
max-height:{1}px;
height:expression(this.scrollHeight > {1}? "{1}px" : "auto" );
overflow:auto;
overflow-x:hidden;
}
changed to:

Quote:
.sizedsig {
max-height:{1}px;
max-width:600px;
height:expression(this.scrollHeight > {1}? "{1}px" : "auto" );
overflow:auto;
overflow-x:hidden;
}
You might have to play with an "overflow-y:" setting as well. Make sure if you play with these that you check the results with at least IE6, firefox and opera. The all deal with overflow differently.

Good luck and let me know how it goes.
Reply With Quote
  #20  
Old 03-16-2006, 03:06 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Opera have always given me the most problems when CSS is concerned. Props to you sinaluna on a great mod and support.
Reply With Quote
  #21  
Old 03-16-2006, 04:32 AM
rwoelich's Avatar
rwoelich rwoelich is offline
 
Join Date: Jan 2005
Location: Denver
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Coolest. Hack. Ever.

Well, maybe not coolest, but definitely up there.

If you use this in combination with the "Extended Signature Limits" hack, you can control almost all aspects of the signatures... if they find a way to break your line limit, tada!

Nice work.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05876 seconds
  • Memory Usage 2,310KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete