Length of user names

Started by jelv, January 12, 2008, 10:09:08 AM

Previous topic - Next topic

jelv

Why are user names allowed to be so long? Should there be a limit on the maximum number of characters in each word in the user name to prevent it breaking the forum formatting?

Here's a partial screenshot of what it does to the index of this forum:

jelv

karlbenson

SMF does have a limit on the no. of characters in the displayname/realname.

I believe its 25.

if you want to shorten it, there was a tip posted
http://www.simplemachines.org/community/index.php?topic=104702.0

jelv

If you view the image in my post so that you can see it full size you will see that I was able to enter a 60 character name (with no spaces) on these forums. It totally messed up the layout of the forum index page and any forums I posted in.

The link you gave was very useful - thank you.
jelv

jelv

Why has this been moved to fixed or bogus bugs?
jelv

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Sverre

Quote from: jelv_there_is_problem_if_people_use_long_names_with_no_space on January 31, 2008, 07:42:24 PM
Why has this been moved to fixed or bogus bugs?

Probably because the 60 character limit on display names is by design, not mistake (Ref. 1.1.2. Release Notes).

Jade Elizabeth

Quote from: Sverre on February 01, 2008, 05:29:32 PM
Quote from: jelv_there_is_problem_if_people_use_long_names_with_no_space on January 31, 2008, 07:42:24 PM
Why has this been moved to fixed or bogus bugs?

Probably because the 60 character limit on display names is by design, not mistake (Ref. 1.1.2. Release Notes).

And people with long usernames, should be banned :P
Or at least have their usernames edited, and be locked out of their own profile :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

falguni1

lol.

jelv_does_not_learn_and_now_has_a_3_day_ban brought a good point in notice.


this should be corrected in smf 2.0

Jade Elizabeth

Quote from: falguni1 on February 02, 2008, 03:21:28 AM
lol.

jelv_does_not_learn_and_now_has_a_3_day_ban brought a good point in notice.


this should be corrected in smf 2.0

I think the ban will correct it mostly ;)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

DavidCT

Quote from: Sverre on February 01, 2008, 05:29:32 PM
Probably because the 60 character limit on display names is by design, not mistake (Ref. 1.1.2. Release Notes).

Quote
*Restricted display name to only sixty characters

I didn't want to get in on this, but... 60 characters is overkill, IMHO.  It should require a space here and there or give an error saying the name is too long.  It does screw up the posts display and probably other areas.

DavidCT

To fix this, possible edit (didn't test)...

Register.php:


// Validation... even if we're not a mall.
if (isset($_POST['realName']) && (!empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum')))
{
$_POST['realName'] = trim(preg_replace('~[\s]~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName']));
if (trim($_POST['realName']) != '' && !isReservedName($_POST['realName'], $memID) && $func['strlen']($_POST['realName']) <= 60)
$possible_strings[] = 'realName';
}


and Profile.php:


$_POST['realName'] = trim(preg_replace('~[\s]~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName']));
if (trim($_POST['realName']) == '')
$post_errors[] = 'no_name';
elseif ($func['strlen']($_POST['realName']) > 60)
$post_errors[] = 'name_too_long';


change 60 to whatever you want.  Let me know if it works :)

jelv

Funny how the reaction of some people is not to accept that there is a problem (and end the matter by accepting the need for a change and discussing which version it needs to be fixed in) but instead to swing a big stick and hand out a ban. The fact that the impact was considered so significant that a ban was needed rather proves the point.

I note that this topic is still in the Fixed or Bogus Bugs board.

You might consider that if I'd wanted to really mess things up a name such as jelv_WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW which is still rather less than 60 characters could have been used. Which takes me to (my bold):

Quote from: DavidCT on February 02, 2008, 02:42:12 PM

I didn't want to get in on this, but... 60 characters is overkill, IMHO.  It should require a space here and there or give an error saying the name is too long.  It does screw up the posts display and probably other areas.


I've been doing some experimenting with long names with embedded spaces. In a few places a name wrapping over two or more lines doesn't look pretty, but it generally just messes up the posts of just that user. To protect the overall forum layout I would suggest that a maximum of around 25 characters per space separated word should be ample - even 25 lower case letters is quite wide: abcdefghijklmnopqrstuvwxy
jelv

karlbenson

Its not a bug per se. Its a feature.

Although I agree it does need tweaking to be shorter.

Personally I have this on my 'mods' to do list and to also set the characters that can be used (as I'm sick of people using copyright and trademark symbols in display name).

My personal settings would be max 15 chars, [a-z0-9-_ ] and the special aeiou chars for instance.

jelv

Have you any thoughts on whether longer names should be allowed if they include spaces?
jelv

karlbenson

Not allowed. Because IMO wrapping is just as bad as forcing it to scroll alot.

Jade Elizabeth

Quote from: karlbenson on February 05, 2008, 05:58:32 PM
Not allowed. Because IMO wrapping is just as bad as forcing it to scroll alot.

I had to compact my forum ;)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: