Signature limits?

youdontknowme

Well-Known Member
Didn't really know where to post this, but mods/admins:

why does the 175 char sig limit (which I think is fine, btw, weighty sigs dilute forums) include the BBCode params, for example, to put a link in my sig, the URL the link points to, and the sig text, and the [tags] all have to be less than 175 chars total....

that doesnt make much sense :( . oh well, url shortening ftw.

sounds like someone needs to mod their fluxbb install. I'll grab the source later tonight and see if I can work out a patch.
 
youdontknowme,

youdontknowme

Well-Known Member
looks like the relevant code starts on line 989 of profile.php but the shit doesnt really hit the fan till right on line 1000.

Code:
if (forum_strlen($form['signature']) > $forum_config['p_sig_length'])
    $errors[] = sprintf($lang_profile['Sig too long'], $forum_config['p_sig_length']);
unless forum_strlen() is suppose to account for BBCode... but it certainly didn't seem too. more sauce exploration is necessary. it could be a bitch to calculate how long in displayed characters a sig is, but im sure some of this code has been written elsewhere before

EDIT: no, its just
Code:
// An UTF-8 aware version of strlen()
function forum_strlen($str) {
    return strlen(utf8_decode($str));
}
location: upload/include/functions.php

pretty weak. but it probably shouldnt be touched, it looks like flux uses it for checking things like password length too, and passwords definitely are BBCode aware inputs. wrapping the call on line 1000 of profile.php is the way to go.

regex's = win
 
youdontknowme,

youdontknowme

Well-Known Member
No, I was serious..... I really do hate long sigs. Especially big distracting images. keep it simple. which is why I think the modification would help. the 2 line limit is good it should stay. I have some code that would probably work really well, stolen in part from phpBB. Who ever came up with BBCode, however, realized their intended domain and did some pretty clever things to make it a easy syntax to parse for displayed character length. I thought it was going to be a bitch like HTML is to parse (can't do that with regex, you def. need a stack based lexical parser).

And I don't have time for flux's own forum I just hopped on their IRC chan for a sec to make i wasnt just really tired lol.

If there's interest in applying my patch let me know, I can send you the source. Otherwise, the new 350 limit has my sig back in business.

Thanks!
 
youdontknowme,
Top Bottom