Kunena 5.2.4 and Blue eagle 1.6.4 released (04 Apr 2021)

The Kunena team has announce the arrival of Kunena 5.2.4 [K 5.2.4] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.2 and issues discovered during the development stages of K 5.2.4

Blue Eagle 1.6.x requires Kunena 5.2.x to work with, this template isn't designed to works with Bootstrap 4.

× Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Question Jomsocial hack to show profile fields and gallery link

7 years 2 months ago - 7 years 3 weeks ago #1 by thepiston
Thought I'd share this. You can adjust it for your needs.

It shows age in years, gender, link to gallery if it exists, etc.

I put this after line 56 in this file:
//get important Joomla data and connections
$authorid = $this->profile->userid;
$username = $this->profile->username;
$jspath = JPATH_BASE.DS.'components'.DS.'com_community';
$user =& CFactory::getUser($authorid);
// write profile fields you want to retrieve here, find the name of the field on Jomsocial profile field area
$country = $user->getInfo('FIELD_COUNTRY');
$haller = $user->getInfo('FIELD_HALLER');
$gender = $user->getInfo('FIELD_GENDER');
$date_of_birth = $user->getInfo('FIELD_BIRTHDATE');
$condition = $user->getInfo('contition');
$sx_status = $user->getInfo('sx_status');
//figure out age in years
$DateOfBirth      = strtotime($date_of_birth);
$DateDifference   = time() - $DateOfBirth;
$AgeInYears       = $DateDifference /(60*60*24*365);
$AgeInYears  = floor($AgeInYears);
//figure out if gallery exists, if photos are in gallery, and gallery set to public or members
//0=public, 20=members, 30=friends, 40=me only
$query = "SELECT a.`creator`
from `jos_community_photos_albums` a, `jos_community_photos` b
where a.`creator` = $authorid
and a.`permissions` IN (0, 20)
and a.`id` = b.`albumid`";
$db->setQuery( $query ); 
$gallery = $db->loadResult(); 
//show gender and age if available
if (isset($gender, $date_of_birth)) {
echo "$gender, $AgeInYears<br />";
//show link to gallery if there is one
if ($gallery) {
echo "<a href='https://www.YOUR.DOMAIN/my-photos/$authorid-$username'>My Gallery</a><br />";
//these last 2 are specific to my page, but you can do something similar with your custom fields
//show condition and status if they exist
if ((isset($condition, $sx_status)) && ($condition!= "None")) {
echo "$condition<br />$sx_status<br />";
//show haller if it exists
if ($haller) {
echo "Haller: $haller";
Last edit: 7 years 3 weeks ago by thepiston.

Please Log in or Create an account to join the conversation.

7 years 1 month ago #2 by ChrisK
I'm currently running Joomla 2.5 / JomSocial 3.1.x / Kunena 3.x

I have been trying to get JomSocial Custom Profile Fields to show up on Kunena templates for a while now.

I tried the code you provided, specifically focusing on the JomSocial Custom Profile Fields. Unfortunately though there seems to be an issue with the way the field values are generated, a problem with the Language File.

Instead of

Country: United States

I'm Getting


Just wondering if you might have an idea on how I can go about fixing this up.

Thanks a lot for posting this btw


Please Log in or Create an account to join the conversation.

7 years 1 month ago - 7 years 1 month ago #3 by thepiston
yep, did same ting for me so I canned Country field. I think there's a problem with Jomsocial. You can find a thread about it on their forum somewhere.
Last edit: 7 years 1 month ago by thepiston.

Please Log in or Create an account to join the conversation.

6 years 2 months ago #4 by xamire
Go to your language override and put this as your constant:


and then whatever you want that to say (Obviously United States) and then the language file will always have that!

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.050 seconds