I've been struggling to modify nuke more user friendly especially to my fellow Japanese users. It's OK so far, nuke works fine and now I'm thinking about modifying Your_Account module. And on that point, I have a question.
To be more precise, as of now nuke accepts user names in English (alphabetic characters) only. I'd like to allow them to use other characters like Japanese, Korean, Chinese or whatever.
But modifying Your_Account is not so easy because it holds important clues to security. I can't be too careful to keep it secure so I want you guys to ask for good advice.
Code:
if ((!$uname) || ($uname=="") || (ereg("[^a-zA-Z0-9_-]",$uname))) $stop = "<center>"._ERRORINVNICK."</center><br>";
Above is in Your_Account/index.php and this checks input strings. "ereg" kicks out any non-alphabetic character. My question is about this part. I want to modify it to reject only improper characters, and make it to accept Japanese and other language. Will you give me some tips? Any suggestion is welcome.
# Phew... It's quite difficult to explain such things in non-native language.
Thank you in advance.
Imago Captain
Joined: Jan 17, 2003
Posts: 629
Location: Europe
Posted:
Fri Mar 28, 2003 11:32 am
To avoid the junk between the Roman alphabet and the Cyrillic one, I just add the Cyrillic range after the Roman one, like that:
a-zа-яA-ZА-Я
I suppose, you should first check whether Japanese characters are being accepted by the Forum Registration filter, and if positive, then simply shut up the mainway registration via Your Account.
morgue Nuke Cadet
Joined: Feb 24, 2003
Posts: 9
Location: Tokyo / Japan
Posted:
Fri Mar 28, 2003 8:42 pm
Thanks. If I remember right, I could register to phpBB2 with Japanese user name. That's nice and handy-way.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum