Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Show both username and name

8 years 2 months ago
  • Lolk's Avatar
    Topic Author
  • Lolk
  • Offline
  • Fresh Boarder
  • Thank you received: 0
Licenses:
JomSocial Active

Hi.

Is it possible to show both username and real name in the profile name. The users on my site would really like that.

/Anders Lolk

8 years 2 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Lolk,

You should open this file /components/com_community/templates/jomsocial/layouts/profile/focus.php, find this code :

<h2><?php echo $user->getDisplayName(); ?></h2>
change to :
<h2><?php echo $user->getDisplayName(); ?> ( <?php echo $user->username?> )</h2>

thank you!

8 years 1 month ago
  • Lolk's Avatar
    Topic Author
  • Lolk
  • Offline
  • Fresh Boarder
  • Thank you received: 0
Licenses:
JomSocial Active

Thank you for your answer.

I wan't the username and real name to be showed every where in JomSocial (events, frontpage ect.). Shall I chance the code any other places, or is there an other more simple solution.

/Anders

8 years 1 month ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

I see, so you need modify the core function getDisplayName() inside this file components/com_community/libraries/user.php,

find this code :

return CStringHelper::escape($name);
chaneg to :
return CStringHelper::escape($name). '('. $this->username.')';

thank you!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW