By B.M. on Tuesday, 02 May 2017
Posted in General Issues
Likes 0
Views 234
Votes 0
Hello,

Please look attached pic. Is it possible to have custom fields displayed on the profile like that?

Thanks !
Yep, you could just relocate the codes that is in /components/com_easysocial/themes/wireframe/profile/default/default.php . For the gender, you could use the code below:

[gist]
<?php echo $this->render('fields', 'user', 'profile', 'profileIntro', array('GENDER', $user)); ?>
[/gist]
·
Tuesday, 02 May 2017 21:48
·
0 Likes
·
0 Votes
·
0 Comments
·
I have created the override:

[joomla_root\]templates\mytemplate\code\com_easysocial\themes\wireframe\profile\default\default.php

Is that corrrect?

Because it doesnt seem to work
·
Tuesday, 02 May 2017 22:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

It should be located in the following path,

[joomla_root\]templates\mytemplate\html\com_easysocial\profile\default\default.php
·
Tuesday, 02 May 2017 23:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you.

Ok, genre works.
What about adding other custom fields?

For instance i tried:

<?php echo $this->render('fields', 'user', 'profile', 'profileIntro', array('SEX_SPECIALITY', $user)); ?>

But it doesnt work.

Thanks
S.
·
Wednesday, 03 May 2017 02:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Not all custom fields has widgets. Widgets are like module positions but they are for EasySocial apps. If they don't have a widget, then you'll have to use similar codes like https://stackideas.com/forums/custom-fields-on-profile-cover#reply-334708
·
Wednesday, 03 May 2017 11:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Thanks for the reply.

Im sorry but what is the code?
The link you provided links back to your 1st reply on this tread (the widget code for genre)

Thanks
·
Wednesday, 03 May 2017 19:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Ops, sorry I think my reply was about rendering widgets. To get a value,

[gist]
<?php echo $user->getFieldValue('SEX_SPECIALTY');?>
[/gist]
·
Wednesday, 03 May 2017 22:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes. now it works.

One more question, how can i get the users age ?

May I please ask to have these functions implemented (feature request). I think it would be a nice feature to be able to select which custom fields to appear there and on what order (jomsocial does it).

Thanks
S.
·
Wednesday, 03 May 2017 22:37
·
0 Likes
·
0 Votes
·
0 Comments
·
The birthday field variable is already on the theme file. It uses widgets to output (because there are different types of output)

[gist]
<?php echo $this->render('fields', 'user', 'profile', 'profileIntro', array('BIRTHDAY', $user)); ?>
[/gist]
·
Wednesday, 03 May 2017 23:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Nope, the following code displays nothing

[gist type="php"]
<?php echo $this->render('fields', 'user', 'profile', 'profileIntro', array('BIRTHDAY', $user)); ?>
[/gist]
·
Wednesday, 03 May 2017 23:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

I've tested the code locally, seems it was display correctly: https://www.screencast.com/t/ZLEfQPCZ
·
Thursday, 04 May 2017 12:23
·
0 Likes
·
0 Votes
·
0 Comments
·
This works for now. Closing.
·
Tuesday, 09 May 2017 21:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating, glad that your issue is now resolved. Please understand that our support does not cover customizations.
·
Tuesday, 09 May 2017 21:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post