PREVIEW ☀️Preview for EasySocial Native App is available now ! Download the application and test it out today ☀️

Helpdesk

Modify display of profile

Hello,

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')) { ?>
<span>
<a href="<?php echo $user->getProfile()->getPermalink();?>" >
<i class="fa fa-shield-alt"></i> <?php echo $user->getProfile()->get('title');?>
</a>
</span>

<?php $myprofile=$user->getProfile()->get('title'); ?>
<?php
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') { ?>
<span>
<?php echo JText::_('COM_EASYSOCIAL_USER_NEVER_LOGGED_IN');?>
</span>
<?php } elseif (!$user->isOnline()) { ?>
<span>
<?php echo JText::_('COM_EASYSOCIAL_PROFILE_LAST_SEE

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
Offline

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!