Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
User Selectable Signature Line Display Limit Details »»
User Selectable Signature Line Display Limit
Version: 1.00, by Michael Morris Michael Morris is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-25-2004 Last Update: Never Installs: 6
 
No support by the author.

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.

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 09-27-2004, 03:42 PM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice!! my users will like this
Reply With Quote
  #3  
Old 09-27-2004, 07:12 PM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alkatraz
nice!! my users will like this
nice hack very useful for dialup users.
Reply With Quote
  #4  
Old 09-27-2004, 10:02 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dan
nice hack very useful for dialup users.
definetly.
Reply With Quote
  #5  
Old 12-12-2004, 12:14 PM
Cyn Cyn is offline
 
Join Date: Apr 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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. ?
Reply With Quote
  #6  
Old 12-15-2004, 01:46 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 12-15-2004, 12:06 PM
Cyn Cyn is offline
 
Join Date: Apr 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 01-05-2005, 12:19 PM
Cyn Cyn is offline
 
Join Date: Apr 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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. ?
Reply With Quote
  #9  
Old 01-07-2005, 06:39 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 01-07-2005, 09:54 AM
Cyn Cyn is offline
 
Join Date: Apr 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

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 01:01 AM.


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,290KB
  • Queries Executed 24 (?)
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
  • (4)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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