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.

Need extra field to appear after the name field (everywhere on site)

10 years 5 months ago
  • Susan's Avatar
    Topic Author
  • Susan
  • Offline
  • Fresh Boarder
  • Posts: 69
  • Thank you received: 20
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

We would like to display an extra field after the user's name everywhere.

this would appear
- under avatar
- Member lists
- in the list of friends which appears when you want to send a private message or event invitation

etc

For example Name, Field X

Joe Bloggs, Doctor

would appear

Is this possible?

Thanks!

10 years 5 months ago
Licenses:

Hi, Susan.

Yes, It can be done. You can display any field you have in profile.
Just use my hack from here:

www.jomsocial.com/forum/profile-universa...dd-some-field#109680


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Susan
10 years 5 months ago
  • Susan's Avatar
    Topic Author
  • Susan
  • Offline
  • Fresh Boarder
  • Posts: 69
  • Thank you received: 20
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Hi Michal,

Please could put the final solution here, as in that post there is a lot of dialogue so it is hard to be sure what is the solution?

Thanks a lot

10 years 5 months ago
Licenses:

Hi, Susan.

Sure:

ROOT/components/com_community/templates/default/people.browse.php

Look for this line: <div class="cIndex-Content"> (around line 190).

You'll find there this code:

<h3 class="cIndex-Name cResetH">
<a href="<?php echo $row->profileLink; ?>"><?php echo $row->user->getDisplayName(); ?></a>
</h3>

It displays user name. So just add new divs below it.

You can add every field you have in Customize Profile like this;
<?php 
echo $row->user->getInfo('MY_FIELD_CODE');
?>

MY_FIELD_CODE - this is your field code (not title). You'll find field code in Customize Profile in Field Code column.

Be aware that if your field contains predefined data like country or gender it will display language constant instead of translation.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Susan
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