![]() |
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. |
nice!! my users will like this
|
Quote:
|
Quote:
|
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. ? |
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.
|
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?
|
Quote:
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. ? |
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. |
Quote:
|
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|