Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.

Solved Load/Display user avatar image inside post

More
7 years 11 months ago - 7 years 11 months ago #205774 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: 7 years 11 months ago by ante.resetar.

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

More
7 years 11 months ago #205796 by ante.resetar
Any help much appreciated. Thank you

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

More
7 years 11 months ago #205808 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
7 years 11 months ago #205992 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.108 seconds