I am trying to achieve showing the age inside the popbox. This works fine but not all the time. Some profiles show "unable to load tooltip" but most profiles are working. I am trying to find out what causes this problems. Maybe someone can help?

What I did so far:

I have edited "components/com_easysocial/themes/wireframe/profile/popbox/user.php" and added the following code:

$id = JRequest::getInt( 'id' , null );
// current user profile id
$user = Foundry::user($id);
// Get your current birthday custom field unique key e.g. BIRTHDAY
$birthdayDate = $user->getFieldValue('BIRTHDAY');
// Pass birthday date into this section
$birthDate = new DateTime($birthdayDate);
$now = new DateTime();
// Use this formula generate to age
$age = floor(($now->format('U') - $birthDate->format('U')) / (60*60*24*365));
echo "($age)";
// Result

From line 9 on there seems to be a problem but due to my nearly non-existent programming skills I am not able to find it...

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Support is

The support team is online and will be able to answer your inquiries. Please stay calm, follow the rules and do not cross post.

We will attend to you as soon as we can.

Your time
Stack Ideas time