UPDATES ConverseKit Desktop Available Now! 🖥 ⚡️


Modify display of profile


I have three profile types : Candidate, Delegate and Champion. I’m trying to modify root/templates/charm/html/com_easysocial/helpers/cover/user.php so that a related badge would be displayed showing the profile.

1_1.png for Candidate (profile ID 1)
1_2.png for Delegate (profile ID 7)
1_3.png for Champion (profile ID 10)

The following code is failing and 1_2.png is displayed for all three profiles instead of for only delegate . Can you help me to get the right code?

<?php echo $this->render('module', 'es-profile-after-name'); ?>
<div class="es-profile-header__meta">
<?php if ($this->config->get('users.layout.profiletitle')) { ?>
<a href="<?php echo $user->getProfile()->getPermalink();?>" >
<i class="fa fa-shield-alt"></i> <?php echo $user->getProfile()->get('title');?>

<?php $myprofile=$user->getProfile()->get('title'); ?>
if ($myprofile="Delegate";) {
echo '<span><center><img src="images/rank/1_2.png"; /></center></span>';
echo $myprofile;

<?php } ?>

<?php if ($this->config->get('users.layout.lastonline')) { ?>
<?php if ($user->getLastVisitDate() == '0000-00-00 00:00:00') { ?>
<?php } elseif (!$user->isOnline()) { ?>

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

Your time
Stack Ideas HQ
Support is

It is currently off working hours and most of us aren't around.

Rest assured that we will get back to your issues as soon as the day starts tomorrow!

Subscribe for product updates & promotions