1
blackrx
user management - change username to realname ?
  • 2017/5/26 0:45

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


Hye

i need to change the username to realname is this section

** modules/system/admin.php?fct=users

Resized Image

which file i can change it ?

Thank you in advance

2
zyspec
Re: user management - change username to realname ?
  • 2017/5/26 1:49

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Since I'm not sure which version of XOOPS you're using here's an example of what you would do for XOOPS 2.5.9

in ./modules/system/templates/admin/system_users.tpl - line 46 should look like:
Quote:
<td class="txtcenter"><a title="<{$users.uname}>" href="<{$xoops_url}>/userinfo.php?uid=<{$users.uid}>"><{$users.uname}>a>td>


just replace both occurances of $users.uname with $users.name - like:
Quote:
<td class="txtcenter"><a title="<{$users.name}>" href="<{$xoops_url}>/userinfo.php?uid=<{$users.uid}>"><{$users.name}>a>td>


Don't forget - after you make the change you'll need to clear the template cache or else you won't see the change take affect until after the cache expires. The change above also does not change the "Search User" box so it will still try and find the uname (nickname) and not the real name. I'd have to dig a little deeper to see what it would take to change the search box too.

3
blackrx
Re: user management - change username to realname ?
  • 2017/5/26 3:16

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


yes its working

thank you zyspec

will be great if the search box can search name instead of username

i'm using XOOPS in an Intranet environment in my small office

it is a closed site with manual registration and all user are registered using their staff ID...

hopefully XOOPS can implement change username to real name in setting so we dont have to changes files manually...

4
blackrx
Re: user management - change username to realname ?
  • 2017/5/26 3:28

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


still in topic

anyone can help me which file to edits to show username in isearch module administration

https://github.com/XoopsModulesArchive/isearch
im using
Isearch 1.9
XOOPS 2.5.8.1

i tried to replace uname to name in ...modules\isearch\admin\index.php

but having a half loading page....

5
zyspec
Re: user management - change username to realname ?
  • 2017/5/26 14:17

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Quote:

blackrx wrote:
yes its working

thank you zyspec

will be great if the search box can search name instead of username

i'm using XOOPS in an Intranet environment in my small office

it is a closed site with manual registration and all user are registered using their staff ID...

hopefully XOOPS can implement change username to real name in setting so we dont have to changes files manually...


@blackrx,

Note: I haven't actually tried this but this should work.

You can try to modify the search box by changing lines 788 - 793 in ./modules/system/admin/users/main.php from:
$user_uname = (!isset($_REQUEST['user_uname'])) ? '' $_REQUEST['user_uname'];
//Form tris
$form '
          ' 
_AM_SYSTEM_USERS_SEARCH_USER 'myts->htmlSpecialChars($user_uname) . '" size="15">
        
        
_AM_SYSTEM_USERS_ALLGROUP '';

to replace 'user_uname' with 'user_name' like:
$user_name = (!isset($_REQUEST['user_name'])) ? '' $_REQUEST['user_name'];
//Form tris
$form '
          ' 
_AM_SYSTEM_USERS_SEARCH_USER '$myts->htmlSpecialChars($user_name) . '" size="15">
        
        
_AM_SYSTEM_USERS_ALLGROUP '';


Once again, don't forget to flush the template cache or you won't see the results immediately.

6
blackrx
Re: user management - change username to realname ?
  • 2017/5/27 12:12

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


thank you zyspec..its working

7
blackrx
Re: user management - change username to realname ?
  • 2017/5/27 12:17

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


Quote:

blackrx wrote:
still in topic

anyone can help me which file to edits to show username in isearch module administration

https://github.com/XoopsModulesArchive/isearch
im using
Isearch 1.9
XOOPS 2.5.8.1

i tried to replace uname to name in ...modules\isearch\admin\index.php

but having a half loading page....


anyone can me with this ?

Login

Who's Online

429 user(s) are online (331 user(s) are browsing Support Forums)


Members: 0


Guests: 429


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits