vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   User Selectable Signature Line Display Limit (https://vborg.vbsupport.ru/showthread.php?t=69897)

Michael Morris 09-25-2004 10:00 PM

User Selectable Signature Line Display Limit
 
This hack is based on a vb2.2.x hack originally created by bejita.
(http://forum.kafegaul.com/forum)

The original thread is here.

SUMMARY

This hack allows your users to choose the maximum number of signature lines that will be displayed for them. So User A can set a limit of 5 lines for himself and he won't see any further lines that might exist in another user's sig.

This hack has one known minor glitch. If a user opens a bbcode on line 4 and closes it on line 6 of their sig then the closing tag will be lost. This will cause sig to show orphan bbcode tags from time to time. Users need to be aware of this when they turn the feature on for themselves.

alkatraz 09-27-2004 03:42 PM

nice!! my users will like this

Dan 09-27-2004 07:12 PM

Quote:

Originally Posted by alkatraz
nice!! my users will like this

nice hack :) very useful for dialup users.

Polo 09-27-2004 10:02 PM

Quote:

Originally Posted by Dan
nice hack :) very useful for dialup users.

definetly.

Cyn 12-12-2004 12:14 PM

Michael, a few questions.

How does this define 'lines'?

On our forum we have side banner ads and paid subscription options to opt out of the side banner ads. This alters the length of signatures for the different views - with the side banners and without them. Of course without the banner ads a line is longer. So how would this work in our case?

Is there any way possible for me to force this for all users so that I can restrict everyone's view of signatures to 2 lines? This would serve to limit all signatures to not exceed two lines, which I would love to have the ability to do.

How does this treat vB code such as smilies, formatting, URLs, etc. ?

Michael Morris 12-15-2004 01:46 AM

The parser looks for carriage returns and counts them. When it finds the user's limit, it dumps the rest of the sig. So it checks the height of the sig, not it's width.

Cyn 12-15-2004 12:06 PM

And if there are no carriage returns but rather a long line of text that stretches over four or five lines? Would it permit that?

Cyn 01-05-2005 12:19 PM

Quote:

Originally Posted by Cyn
And if there are no carriage returns but rather a long line of text that stretches over four or five lines? Would it permit that?

Asking again:

1. If there are no carriage returns how does it count the lines?

2. Can I possibly force a view of 2 lines for all users to serve as a signature line limit tool for all members?

3. How does this treat vB code such as smilies, formatting, URLs, etc. ?

Michael Morris 01-07-2005 06:39 AM

The lines are counted by carriage returns only - no other method is used. The lines are also counted (and the limit applied) before parsing bbcode or smilies, so it has the capacity to break tags. This is an unavoidable bug to the hack retained from the original vb2 version.

If a user has a continous line of text in their signature that takes multiple lines to display this hack cannot detect that. It's a rather quick and dirty affair. I didn't write the original - I only ported it over to vb3 because I was asked to convert a board that had this hack installed on vb2. I haven't really researched it beyond moving the code - mostly as is - to vb3.

As to setting the limit to 2, you can do that by simply putting 2 in place of $bbuserinfo['fieldX']. It might be better to just set the default to 2 when you create the user profile field - the system has to deal with the information anyway and users appreciate tools more than limits, as a rule.

Sorry for the reply delay.

Cyn 01-07-2005 09:54 AM

Quote:

Originally Posted by Michael Morris
The lines are counted by carriage returns only - no other method is used. The lines are also counted (and the limit applied) before parsing bbcode or smilies, so it has the capacity to break tags. This is an unavoidable bug to the hack retained from the original vb2 version.

If a user has a continous line of text in their signature that takes multiple lines to display this hack cannot detect that. It's a rather quick and dirty affair. I didn't write the original - I only ported it over to vb3 because I was asked to convert a board that had this hack installed on vb2. I haven't really researched it beyond moving the code - mostly as is - to vb3.

As to setting the limit to 2, you can do that by simply putting 2 in place of $bbuserinfo['fieldX']. It might be better to just set the default to 2 when you create the user profile field - the system has to deal with the information anyway and users appreciate tools more than limits, as a rule.

Sorry for the reply delay.

Thanks for your response Michael. :)


All times are GMT. The time now is 12:25 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.03466 seconds
  • Memory Usage 1,740KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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