I recently found one more thing that have to be modified (step 6).
I just post all you need to modify to remove displayname in XOOPS 2.2.x here, so it wont be so difficult to follow.
Thanks to baraxas who got the removing of displayname rolling
(1) In modules\profile\register.php, find these lines:
if ($op != "register") {
$newuser->setVar('uname', isset($_POST['uname']) ? trim($_POST['[b][color=FF3300]uname[/color][/b]']) : '');
$newuser->setVar('loginname', isset($_POST['loginname']) ? trim($_POST['loginname']) : '');
$newuser->setVar('email', isset($_POST['email']) ? trim($_POST['email']) : '');
and replace it with:
if ($op != "register") {
$newuser->setVar('uname', isset($_POST['uname']) ? trim($_POST['[b][color=FF3300]loginname[/color][/b]']) : '');
$newuser->setVar('loginname', isset($_POST['loginname']) ? trim($_POST['loginname']) : '');
$newuser->setVar('email', isset($_POST['email']) ? trim($_POST['email']) : '');
(2) Find these lines in your modules\profile\edituser.php :
$edituser->setVar('name', $myts->stripSlashesGPC(trim($_POST['name'])));
$edituser->setVar('uname', $myts->stripSlashesGPC(trim($_POST['[b][color=FF3300]uname[/color][/b]'])));
and replace it with:
$edituser->setVar('name', $myts->stripSlashesGPC(trim($_POST['name'])));
$edituser->setVar('uname', $myts->stripSlashesGPC(trim($_POST['[b][color=FF3300]loginname[/color][/b]'])));
(3) Still in the same file (modules\profile\edituser.php), find:
$avatar->setVar('avatar_file', $uploader->getSavedFileName());
$avatar->setVar('avatar_name', $xoopsUser->getVar('[b][color=FF3300]uname[/color][/b]'));
$avatar->setVar('avatar_mimetype', $uploader->getMediaType());
and change it to:
$avatar->setVar('avatar_file', $uploader->getSavedFileName());
$avatar->setVar('avatar_name', $xoopsUser->getVar('[b][color=FF3300]loginname[/color][/b]'));
$avatar->setVar('avatar_mimetype', $uploader->getMediaType());
(4) Open profile\include\forms.php and comment out with setting two slashes in front of these lines:
$elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME, "uname", $uname_size, 75, $user->getVar('uname', 'e')), 'required' => true);
$weights[0][] = 0;
(5) In the same file (profile\include\forms.php), comment also out these lines:
$elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME, 'uname', 25, 75, $user->getVar('uname', 'e')), 'required' => 0);
$weights[0][] = 0;
(6) Open modules\profile\admin\user.php and find the lines (it should be around line 123):
$user->setVar('uname', $_POST['[b][color=FF3300]uname[/color][/b]']);
$user->setVar('loginname', $_POST['loginname']);
and replace it with:
$user->setVar('uname', $_POST['[b][color=FF3300]loginname[/color][/b]']);
$user->setVar('loginname', $_POST['loginname']);
If you find any more that will need to be modified or get any more "displayname is to short.." messages, please give us a word
Best Regards,
Bananadude