Update Release! EasyDiscuss 4.1.12 is available now 🎊Upgrade to the latest version today!


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

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.