vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Signature "Line Limiter" (https://vborg.vbsupport.ru/showthread.php?t=67111)

Cyn 01-05-2005 01:00 PM

I had no problem following all the steps but it's not limiting signatures to two lines for me. I logged into one of our test accounts and was able to place several sentences in that account's signature (no carriage returns) that far exceeded two lines, which is the limit I set in the new profile option. Can someone help me figure it out please? :nervous:

Andreas 01-11-2005 07:13 PM

Well, if there are no line-breaks it is just one line - even if it is displayed in more then 1 line on your screen (which just means that it is not wide enough ;))

Or in other words: It is not possible to determine which text length is "one line", as this depends on screen width.

The only way would to specify what "one line" shold be is to specify that it should be max. xx characters.
But one has to keep in mind that if this is based on a 1024x768 resolution, it will be much less then "one line" for somebody using 1600x1200 for example.

Cyn 01-11-2005 07:58 PM

Quote:

Originally Posted by KirbyDE
Well, if there are no line-breaks it is just one line - even if it is displayed in more then 1 line on your screen (which just means that it is not wide enough ;))

Or in other words: It is not possible to determine which text length is "one line", as this depends on screen width.

The only way would to specify what "one line" shold be is to specify that it should be max. xx characters.
But one has to keep in mind that if this is based on a 1024x768 resolution, it will be much less then "one line" for somebody using 1600x1200 for example.

And on top of it all the character count does include vb code. So formatting text such as [ and color= and url= and font=squiggly and such are all included, cheating the true displayed character count.

*Sigh* I wish I could find a reasonble solution to this.

Andreas 01-11-2005 08:08 PM

Well, one could strip the code before checking the length :)

Cyn 01-11-2005 08:10 PM

How would one do that?

Andreas 01-11-2005 08:18 PM

PHP Code:

$length vbstrlen(strip_bbcode($inputtrue)) 


Cyn 01-11-2005 08:31 PM

Great! Where would I place that?

Illuvatar 01-12-2005 02:18 AM

Yea...I've ran into the same issue. :( Without a character count restriction, you can cut and paste a whole paragraph into the siggy and get away with it. lol

We currently have our character limit set to 500, and we may have to go smaller.

Cyn 01-12-2005 06:56 PM

Kirby, I have a thought that perhaps you can help with. Could this be applied to the existing setup for the signature character limit feature in vB3? That way I could place a character limit that would count only the true characters and ignore vBcode. Is it possible to place this same code somewhere to have that effect in the character count?

JimF 01-15-2005 07:19 AM

This little mod combined with this one is a very good thing :).


All times are GMT. The time now is 04:05 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.01042 seconds
  • Memory Usage 1,730KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete