×
Blue Eagle 1.5.2 Released (11 Dec 2018)

The Kunena team has announce the arrival of Kunena Blue Eagle 1.5.2 which is now available for download as a native Joomla extension for Kunena 5.1. This version addresses most of the issues that were discovered in K 1.5.1 and issues discovered during the development stages of K 1.5.2.

× Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Solved How to display avatar in full.php

More
2 years 1 month ago #1 by polki
Hey guys !

I'd like to know how to call user avatar + name + rank in the page

com_kunena/template/crypsis/layouts/message/edit/full.php

I know where to add it, and how to style it to fit where I want, but I do absolutely not know how to call it.

I tried to search for "Kunena call avatar" on Google, found this " forum.joomla.org/viewtopic.php?t=728350 " but it doesn't seem to work since I think, it's an old post and Kunena as been updated.

What I'm trying to do is to display user avatar + name + actual rank next to the "Quick reply" at the bottom of a topic page ( I have the quick reply set to "Always visible" )

Thanks in advance for your help : )

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

More
2 years 1 month ago - 2 years 1 month ago #2 by 810
<?php
$template = KunenaFactory::getTemplate();
$author2 = $message->getTopic()->getFirstPostAuthor();
$avatar = $author2->getAvatarImage($template->params->get('avatarType'), 'list');?>
<?php echo $author2->name . '<br /> ' . $author2->getLink($avatar) . '<br /> ' . $author2->getRank(0, 'image'); ?>
Last edit: 2 years 1 month ago by 810.

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

More
2 years 1 month ago #3 by polki
Hey 810.

Thanks for your answer :)

This is what I went for, after editing your code ( and it works great ) :
<span class="userquickreply">
<li><?php echo $me->getLink($avatar, 'quickreplyavatar');?></li>
<li><strong><?php echo $me->getLink(null, null, 'canonical', '', null, $this->category_id); ?></strong></li>
<li><?php echo $me->getRank(0, 'title');?></li>
</span>

Just one thing : I can't manage to make the avatar the size I want ( or a preset avatar size in template parameters ).
It's very small.

How can I change avatar's size ? ( or display at the profilebox size )

Thanks in advance !

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

More
2 years 1 month ago #4 by 810
if you look on the crypsis settings, then go to avatars, there you will see the sizes.

We take now list, so if you want to have bigger, then change the code to welcome or a other big size name.

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

More
2 years 1 month ago #5 by polki
Worked ! thanks a lot :)
Solved ! :)

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

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