Kunena 6.2.4 Released

The Kunena team has announce the arrival of Kunena 6.2.4 [K 6.2.4] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Solved Load/Display user avatar image inside post

More
5 years 2 months ago - 5 years 2 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...

Code:
<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: 5 years 2 months ago by ante.resetar.

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

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

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

More
5 years 2 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
5 years 2 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.

Time to create page: 0.409 seconds