MyBB Community Forums

Full Version: Signature Formatting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've tried to make it so that formatting doesn't actually count against the character count for signatures, however it doesn't seem to work...

For a quick test of this (before posting), I set MyCode affects signature length to "no" and set the allowed characters to 100. For the test signature, I started with "Here you can enter a short message which will automatically be appended to the bottom of your posts." and tested it, and it was allowed... so I entered formatting (nothing involving links even)
[align=justify][b]Here[/b] you [i]can[/i] place [u]a[/u] short [b]message[/b] which [i]will[/i] automatically [u]be[/u] appended [b]to[/b] the [i]bottom[/i] of [u]your[/u] posts.[/align]
and got back:
Quote: * You cannot update your signature because it is too long. The maximum length for signatures is 100 characters. Please remove 6 characters and try again.

Forum: forum.helpthislife.com

Test User: test
Test Pass: 123456789
Bump
These questions really are sincere...
I counted 107 or thereabouts characters not including MyCode. I'm not going to count it again to double check that because it took ages but are you sure your not over 100 characters? Toungue

Spaces are counted remember.
I reported a bug about something like this many moons ago... let me go and find it.
TimB.,
http://www.javascriptkit.com/script/scri...ount.shtml - says 100 exactly
http://www.webworldindex.com/countcharacters.htm - agrees with the above count
http://www.lettercount.com/ - agreed with BOTH of the above

So yeah, I'm pretty sure of that. Plus it allowed it before I threw in the formatting. Unless maybe specific details in the mycode count (ie the "justify" in the alignment one maybe? Though that'd be 7...). It's also obviously not counting all MyCode, since the signature was exactly at the limit.

EDIT: Okay, thanks Matt. I am interested in more info on this...
I have been doing more testing and it turns out spaces aren't counted, so technically your text is 17 characters under the limit, therefore there are 23 characters that are being incorrectly counted.

I haven't been able to track down exactly what that is though...
[ align=justify ][ /align ] adds those 23 characters. Remove it and it should work.

It's not removed by $parser->text_parse_message($mybb->input['signature']) hence it's counted like so.
Well that would explain that one. I'm guessing, then, that url and color (as well as possibly size) are also not removed by this? As well as custom MyCodes? Because I first noticed the problem before while trying to add in links (and custom-code links) and having to continually up my max character count for my own signature to work despite that setting.
It removes only a limited set of standard tags. Check out inc/class_parser.php::text_parse_message to find out which.