×
Kunena 5.2.4 and Blue eagle 1.6.4 released (04 Apr 2021)

The Kunena team has announce the arrival of Kunena 5.2.4 [K 5.2.4] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.2 and issues discovered during the development stages of K 5.2.4

REQUIREMENTS
Blue Eagle 1.6.x requires Kunena 5.2.x to work with, this template isn't designed to works with Bootstrap 3 and Bootstrap 4.

Solved Load/Display user avatar image inside post

More
2 years 4 months ago - 2 years 4 months ago #1 by ante.resetar
Hi guys. I want to load user avatar image inside the post.

This is my template code inside template/crypsis/layouts/message/item/default.php and it displays created date, edited date, ID and username...

<small class="text-muted pull-right">
		<?php if ($this->ipLink && !empty($this->message->ip)) : ?>
			<?php echo KunenaIcons::ip(); ?>
			<span class="ip"> <?php echo $this->ipLink; ?> </span>
		<?php endif; ?>
		<?php echo KunenaIcons::clock(); ?>
		<?php echo $message->getTime()->toSpan('config_post_dateformat', 'config_post_dateformat_hover'); ?>
		<?php if ($message->modified_time) : ?> - <?php echo KunenaIcons::edit() . ' ' . $message->getModifiedTime()->toSpan('config_post_dateformat', 'config_post_dateformat_hover'); endif; ?>
		<a href="#<?php echo $this->message->id; ?>" id="<?php echo $this->message->id; ?>"
		   rel="canonical">#<?php echo $this->numLink; ?></a>
		<span class="visible-phone"><?php echo Text::_('COM_KUNENA_BY') . ' ' . $message->getAuthor()->getLink(); ?></span>
	</small>

After the username i want to display the user avatar. I'm not very skilled with PHP but i know you are :)

Thank you
Last edit: 2 years 4 months ago by ante.resetar.

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #2 by ante.resetar
Any help much appreciated. Thank you

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #3 by 810
try:
<?php echo $this->message->getAuthor()->getAvatarImage(KunenaFactory::getTemplate()->params->get('avatarType'), 120);

where 120 is the size.

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #4 by ante.resetar
That worked like charm! Mark as solved. Thank you chief!

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.083 seconds