By alex shvarts on Tuesday, 01 September 2015
Posted in General Issues
Replies 3
Likes 0
Views 776
Votes 0
Hello,

i have followed some previous forums and have been able to achieve displaying the custom fields but adding the following code in components/com_easysocial/themes/wireframe/profile/default.header.php

the code i added was the following:
<span>
<?php $my = FD::user($id); echo $my->getFieldValue('school_selection');?>
</span>
<span>
<?php $my = FD::user($id); echo $my->getFieldValue('user-type');?>
</span>
<?php } ?>

what i would like to further achieve is to make the fields clickable juts like the other fields in this section so that when someone clicks on the field ('school_selection') they will see all the users who have that custom field.

i have attached a screen shot.

My second problem is that i followed your post which stated to replacing $id with $user to show users custom field, but that does not work. how do i display the users custom fields values?

Thanks
Hi Alex,

I am really sorry for the delay of this reply. Please find my answers from your inquiries below.

what i would like to further achieve is to make the fields clickable juts like the other fields in this section so that when someone clicks on the field ('school_selection') they will see all the users who have that custom field.

Unfortunately we do not have the API for this yet currently.

My second problem is that i followed your post which stated to replacing $id with $user to show users custom field, but that does not work. how do i display the users custom fields values?

I am not sure if I understand you here. Can you elaborate more on this?
·
Tuesday, 01 September 2015 17:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, the second issue is that i am trying to display the custom fields for the user profile i am looking at, when i use $id it shows the logged in users custom fields values and not the profile i am looking at. when i try and replace the $id with $user the page breaks, what is the correct code to display the users custom fields i am visiting and not mine since i am the logged in user?
·
Tuesday, 01 September 2015 21:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Alex,

Ah I see. You can use the following code in order to get the user profile id from the url.
$user = $this->input->get('id', 0, 'int');
$my = FD::user($user)
·
Wednesday, 02 September 2015 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post