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.
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.
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.
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.