Registration Name Restriction
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Registration Name Restriction
If this is considered a feature request, then please ignore it. I am the webmaster for a WoW guild, and I love the fact that we can now restrict people from using spacers in their names, as WoW doesn't allow this anyway. However, WoW also does not allow numerical characters. If it is easy enough, would it be possible to add a setting to the drop-down box to only allow alphabetical characters? I know that this would be a big help to probably all guilds of any MMORPGs that only allow their members to register under their characters in-game name, and any one else who gets sick of seeing members named jessie23. I would imagine that this would be simple enough, but i really don't want this to be a mod unless absolutely nescissary(sp).
Re: Registration Name Restriction
It would be easy to "MOD" this later....
Take a closer look at
Take a closer look at
Code: Select all
#
# OPEN
#
/includes/acp/acp_board.php
#
# SEARCH
#
/**
* Allowed chars in usernames
*/
function select_username_chars($selected_value, $key)
{
global $user;
$user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[\w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+');
$user_char_options = '';
foreach ($user_char_ary as $lang => $value)
{
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
$user_char_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
}
return $user_char_options;
}
Re: Registration Name Restriction
*Is Lost* Couldn't make heads or tails of that.
Re: Registration Name Restriction
The quickest way to do it would be something like changing
to
in that snippet a couple posts up then use the alpha only setting in the ACP. That will make the alpha only setting exclude numbers.
In short, it would be a very simple mod that you could do yourself.
Code: Select all
'USERNAME_ALPHA_ONLY' => '[\w]+'
Code: Select all
'USERNAME_ALPHA_ONLY' => '[A-Za-z]+'
In short, it would be a very simple mod that you could do yourself.
-
- Registered User
- Posts: 23
- Joined: Thu Jan 19, 2006 6:29 pm
- Location: The Universe
Re: Registration Name Restriction
Hmm, if you didn't want to modify any code, you could go into the Disallow usernames section of the Users and Groups tab in ACP and add 10 usersnames like;
*1*
*2*
*3*
etc.
That way if someone tried to register with any numbers it won't allow them. Considering the time it'd take you to locate the code in the right file, modify/add to it, then reupload, it'd probably be just as quick to do it that way instead.
*1*
*2*
*3*
etc.
That way if someone tried to register with any numbers it won't allow them. Considering the time it'd take you to locate the code in the right file, modify/add to it, then reupload, it'd probably be just as quick to do it that way instead.
Slim Vision
-
- Registered User
- Posts: 397
- Joined: Tue Jul 20, 2004 6:21 am
- Location: Rotterdam, The Netherlands
- Contact:
Re: Registration Name Restriction
dont forget about updating the lang files as well- they need to know before hand it isnt possible to use nummerical characters.
Re: Registration Name Restriction
@Slim Vision: That's a really good hint ! I forgotten the "Disallow usernames" section in acp 
Re: Registration Name Restriction
adding "1" "2" "3" ... "9" "0" to the dissallow usernames will still allow people to register under blah1 or susie26, wouldn;t it?
Re: Registration Name Restriction
Adric wrote: adding "1" "2" "3" ... "9" "0" to the dissallow usernames will still allow people to register under blah1 or susie26, wouldn;t it?
Not if you add an asterisk as a wild card around them like *1*, *2* etc. Or you could do it the hard way, like Dr. Death and I suggested.
Re: Registration Name Restriction
lol, I keep forgetting about the wildcard option...