UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
Our team is away during the weekend. Some answers may already be available on our documentation

Rest assured that we will get back to your posts as soon as the week starts!
  Support is offline

Modify display of profile

Abi · ·
5:33 AM Wednesday, 24 April 2019
None
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
The replies under this section are restricted to logged in users or users with an active subscription with us