Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 18 Dec 2010, 02:37
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Spacing

How would you make it so a username can have more than 1 space in their username?

At the moment you can only have one space in your name.
Reply With Quote
  #2  
Old 18 Dec 2010, 02:44
calorie calorie is offline
 
Join Date: May 2003
Would need to do a file edit:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #3  
Old 18 Dec 2010, 02:45
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Which file would that be done in?
Reply With Quote
  #4  
Old 18 Dec 2010, 02:47
calorie calorie is offline
 
Join Date: May 2003
File class_dm_user.php and maybe elsewhere, you'd need to check to be sure.
Reply With Quote
  #5  
Old 18 Dec 2010, 02:49
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Anyone know what I would specifically have to do?

--------------- Added 18 Dec 2010 at 03:21 ---------------

bump

Last edited by Lilmikeishere; 18 Dec 2010 at 03:21. Reason: Auto-Merged DoublePost
Reply With Quote
  #6  
Old 18 Dec 2010, 03:50
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
You could try taking the space out of the pattern that condenses white space, like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


(the red is where I took out the space)

But I haven't tried it, and I don't know if that's all you would have to do.
Reply With Quote
  #7  
Old 18 Dec 2010, 18:53
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Im assuming some knowledge of regex patterns would be useful here?
Reply With Quote
  #8  
Old 18 Dec 2010, 19:22
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by Lilmikeishere View Post
Im assuming some knowledge of regex patterns would be useful here?
Well, yeah, if you want to understand that code. I'm not an expert in that field, but this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

says replace all sequences of one or more "white space" characters (space, carriage return, newline, tab) with a single space. So obviously any name entered with more than one space in a row will be changed to one space. I was suggesting taking the space out of that pattern (the one right before \r).
Reply With Quote
  #9  
Old 18 Dec 2010, 22:14
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Originally Posted by kh99 View Post
Well, yeah, if you want to understand that code. I'm not an expert in that field, but this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

says replace all sequences of one or more "white space" characters (space, carriage return, newline, tab) with a single space. So obviously any name entered with more than one space in a row will be changed to one space. I was suggesting taking the space out of that pattern (the one right before \r).
Didn't seem to work.

Actually, when you edit it in the admin cp, the name has 2 spaces, but it only shows one space publicly on the current users, or users visited in 24 hours, so I'm guessing something else would have to be modified as well.
Reply With Quote
  #10  
Old 18 Dec 2010, 22:42
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I wonder if that's just HTML - normally multiple spaces get condensed to one. I'm not sure how to fix that easily. You could find everywhere a user name is being displayed and change spaces to  , but that seems like a lot of places.

There's a function called fetch_musername() in includes/functions that gets the "marked up" user name, so if you changed that it would probably handle most places, but I know there are some places where it's just the bare user name.

In retrospect, the single-space thing is probably a good thing because having people with the same user name other than spacing could get confusing (but I'm sure you have your reasons for wanting to allow it).
Reply With Quote
  #11  
Old 19 Dec 2010, 08:30
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Originally Posted by kh99 View Post
I wonder if that's just HTML - normally multiple spaces get condensed to one. I'm not sure how to fix that easily. You could find everywhere a user name is being displayed and change spaces to  , but that seems like a lot of places.

There's a function called fetch_musername() in includes/functions that gets the "marked up" user name, so if you changed that it would probably handle most places, but I know there are some places where it's just the bare user name.

In retrospect, the single-space thing is probably a good thing because having people with the same user name other than spacing could get confusing (but I'm sure you have your reasons for wanting to allow it).
My reasons are that I read the username of vBull with my java server, and people can have usernames with 2 spaces on the game, unfortunately they cannot on the forum, and that causes a conflict.
Reply With Quote
  #12  
Old 19 Dec 2010, 11:44
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I see - I figured you had a good reason.

So I notice that there's a hook at the end of fetch_musername so you don't have to edit that file if you don't want to, you could probably just use hook location fetch_musername with something like


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by kh99; 19 Dec 2010 at 12:02.
Reply With Quote
  #13  
Old 04 Jan 2011, 02:20
Lilmikeishere Lilmikeishere is offline
 
Join Date: Dec 2008
Does anyone know exactly how to do it yet?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:57.

Layout Options | Width: Wide Color: