Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[6.0.1]

The w3t_Posts.B_ParentUser and w3t_PollData.P_IP columns have maximum widths of 20 and 25 characters, respectively. All the other username fields apparently have a maximum width of 30 characters.

Why is this?

I know that the stock input form limits usernames to 16 characters, but I'm importing from UBB.classic, which allows 25-character login names and 35-character public names. I can truncate them if required, but I need to know what the limits are. The more truncation I have to do, the more complicated it will be, since I'll have to contact users individually to let them know their usernames have changed.

Here's a related post concerning this issue.

Edit:

I found some other username columns with widths other than 30:

w3t_Subscribe.S_Username - varchar(60)
w3t_Posts.B_LastEditBy - varchar(64)
w3t_Boards.Bo_Poster - varchar(64)

Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
These will all need to be changed when I do the next release with an altertable. You can change these as you see fit to a consistent size for now by ALTERing the columns.


UBB.threads Developer
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[6.0.2]

Here's a list of all the columns which may contain usernames, along with their current maximum widths (if I've omitted any, please add them):

30 w3t_AddressBook.Add_Owner
30 w3t_AddressBook.Add_Member
60 w3t_Banned.B_Username
65535 w3t_Boards.Bo_Moderators (comma-separated list of usernames)
64 w3t_Boards.Bo_Poster
250 w3t_Favorites.F_Owner
30 w3t_Last.L_Username
30 w3t_Messages.M_Sender
30 w3t_Messages.M_Username
30 w3t_Moderators.Mod_Username
30 w3t_Online.O_Username
25 w3t_PollData.P_IP (username or IP address)
200 w3t_PollData.P_Name (timestamp concatenated with username)
200 w3t_Polls.P_Name (timestamp concatenated with username)
64 w3t_Posts.B_LastEditBy
20 w3t_Posts.B_ParentUser
30 w3t_Posts.B_Username
100 w3t_Ratings.R_Rater
100 w3t_Ratings.R_What (username or post number)
60 w3t_Subscribe.S_Username
30 w3t_Users.U_Username

After these are made more consistent, what will the minimum column width be for usernames? I.e., what is the maximum safe length for a username that will fit into all the columns?

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
*bump*

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
I'd go with 64 on everything just to be safe. This should allow for any modifications in the future if we decide to allow longer usernames than what is currently supported.


UBB.threads Developer
Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Just to make sure I understand, in the next version, the altertable script will set all the above columns to be at least 64 characters wide?

Do you plan on keeping the current limit of 16 characters in adduser.php?

(I'm just trying to decide how much truncation, if any, to do on imported UBB.classic usernames.)

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
The width will be set to 64 chararacters in the next version for all username fields (except for the ones that are a combination of username/timestamp which will need to be 75).

The 16 character limit on usernames will remain and I'll eventually get this into a config option.


UBB.threads Developer
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Thanks


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)