By Marc Olivier on Thursday, 23 June 2016
Posted in General Issues
Replies 11
Likes 0
Views 578
Votes 0
Hello,

I would like to change the information written on each userprofile ... on the right of the picture there is the name, surname and localisation but I would like to add fields that I created on the registration form depending on the group type.

For exemple I use my website for teacher all around France and I would like that the school name (Lycée) and the city name (already shown) as well as the subject (Matière) they teach appear on their profil.

This will help to make connection when friendship is asked not only based on there name but also on the subject taught and their school name.
thanks
MArco
Hey Marc,

You will need to customize the theme file in /components/com_easysocial/themes/wireframe/profile/item.header.php and add the necessary codes to generate the output of the field.

To retrieve values of a field, it's as simple as running the following codes:


<?php
// Get the field value
$value = $user->getFieldValue('UNIQUE_FIELD_CODE');

// Manipulate the $value accordingly.


P/S: Our support does not cover customizations and you should have PHP knowledge to customize this.
·
Thursday, 23 June 2016 21:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Is showing the users address next to the avatar (like Marc's screenshot) an option in ES config or is customization needed? (sorry if this should be a new thread)
·
Thursday, 23 June 2016 23:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello thank you

This is a light customization and your answer enables me to gain some time. I understand that you do not deal with more heavy customization.
Thanks for your quick answer.
Marco
·
Friday, 24 June 2016 00:59
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome Marc.
·
Friday, 24 June 2016 18:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello

Sorry to disturb you again, but I really need to be able to add an extra field. I am building a website for french teachers (I do that as a hobby not getting paid) and learning at the same time. I can read php and learn easily but the problem is that in the php file you sent me I am not sur it is the right one and where to look. I have tried believe me :-)
You were talking about item.header.php file but I found default.header.php I suppose they are the same?
Could you pin point the lines in the file where I should look.

What I did is that I tried to find the place where the name field is written, in the ES config it was written Joomla_name but I can't find it in this file so I wonder if i have the right one or if there is something I do not see.

I know that you don't do customization but I hope that you can give me hints as this is just a field (very important for me) to add on user profile.

Merci beaucoup :-)
Marc Olivier
·
Friday, 24 June 2016 20:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, your file path is correct.
JoomlaFolder\components\com_easysocial\themes\wireframe\profile\default.header.php

I am not really sure what you trying to achieve, by the way, if your custom field unique name is call e.g. `JOOMLA_FULLNAME` , you have to assign into this :

$value = $user->getFieldValue('JOOMLA_FULLNAME');
// This value will show your current profile user full name
echo $value;
·
Friday, 24 June 2016 23:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello

sorry I haven't been clear, here is what I want to do .. I want to keep JOOMLA_FULLNAME but add on the user profil another new field I created.

Thanks
MArco
·
Saturday, 25 June 2016 00:45
·
0 Likes
·
0 Votes
·
0 Comments
·
here not in pdf but image
·
Saturday, 25 June 2016 00:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Marc, How did you get the city and country to show under your cover picture?
·
Saturday, 25 June 2016 00:58
·
0 Likes
·
0 Votes
·
0 Comments
·
in the dashboard of easysocial I dont remember where though :-)
·
Saturday, 25 June 2016 01:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Marc,

To display custom fields on the profile page or anywhere else on the site, you need to use the code which Arlex provided earlier.

Because it doesn't make sense to know the "id" of the field, you need to assign a custom unique key for each of your fields that you want to reference. Take a look at my screen shot here, http://take.ms/GVS8T5
·
Saturday, 25 June 2016 03:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post