From: Zoong P. <dp...@me...> - 2004-05-02 23:00:30
|
> -----Original Message----- > From: p dont think [mailto:pdo...@an...] > Sent: Thursday, 29 April 2004 12:56 PM > To: Zoong Pham > Cc: squ...@li... > Subject: Re: [SM-USERS] modified login name > > > >>>I need to modify user login name in the front login page like this: > >>> replace @ with __ (2 underscores) > >>> replace . with _ (1 underscore). > >>> > >>>I look at src/login.php but don't know where to start. > >>>I don't know PHP and really appreciate for any helps. > > I think it's a simple job but I don't know PHP. I read the > PHP manual and > > played > > with the script src/login.php using str_replace() and $loginnam and > > $loginname_value > > like this: > > $loginname = str_replace("@", "__", $loginname); > > $loginname = str_replace(".", "_", $loginname); > > $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? > > htmlspecialchars($loginname) : ''); > > Looks like you're not doing things in the correct order. Send exact > code if you need help, although doing this as a plugin will > allow you to > upgrade SM without having to re-hack the upgraded code. I found the solution. The file needs to be changed is src/redirect.php not src/login.php. It's a simple change, less than 10 lines of PHP code. If anymone interested, I can send you the diff. vlogin and other plug-in either doens't work for me or overkill for what I want. Cheers, Zoong |