Support ⇒ Explain Please ⇒ How to display Real Name in user profile? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexExplain Please

How to display Real Name in user profile? Reply to topic


How can I get the users "Real Name" to display in their profile so that it will be viewed by all other users (registered users)?

I thought that it would show but on my site it will not and I can't find a setting to change this.

Thanks.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Devuan ascii / Apache 2.4.2x / MariaDB 10.x / PHP 7.0x / DF 9.8 (updated)


In Vanilla dragonfly, you got edit the modules/Your_Account/userinfo.php file


find line (line 44 aprox)

$username = $userinfo['username'];

then add,

$realname = is_user() ? ' ( '.$userinfo['name'].' )': '';

the Add $realname where you want it to be shown:

for example in the page title (find and replace): (line 50 aprox)

$pagetitle .= ' '._BC_DELIM.' '._PERSONALINFO.' '._BC_DELIM.' '.$username.$realname;

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thanks a lot for your help Greenday, it shows in the page title, and this may work fine. What I would like for it to do is to have the name display as part of the actual profile. Do you know how I can make it display on the right side of the Your_Profile page where it would say in the column heading "All about Greenday"? I need for it to show as general information to other registered users. After all the years I have used DF I am surprised that this can't be toggled as an option somewhere. But this is okay.

Thanks for any info you can share.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Devuan ascii / Apache 2.4.2x / MariaDB 10.x / PHP 7.0x / DF 9.8 (updated)


find (abou7 line 77):

<td class="catright" width="60%" align="center"><b><span class="gen">'._ABOUT_USER.$username.'</span></b></td>

and replace with:

<td class="catright" width="60%" align="center"><b><span class="gen">'._ABOUT_USER.$username.' - '.$realname.'</span></b></td>

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


greenday2k, this will work just fine! Thanks a lot!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Devuan ascii / Apache 2.4.2x / MariaDB 10.x / PHP 7.0x / DF 9.8 (updated)


I guess it will not hurt to ask this, but is there any way that the users real name can be viewed on the Members List module? This way all members will be shown on the same page, or many will be shown on one page.

The problem that I am having is that the site I am making is for a group where most know each other and we need to know the real names of the users, not just the usernames.

I am using DF 9.3.4.1 with the reDesigned theme. Thanks for any information shared.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Devuan ascii / Apache 2.4.2x / MariaDB 10.x / PHP 7.0x / DF 9.8 (updated)

All times are UTC


Jump to: