×
Kunena 5.2 RC3 Released (29 Nov 2020)

The Kunena team is thrilled to announce the third public release candidate of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.

The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 RC3 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.

Question Get Avatar Link API

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
4 years 7 months ago #1 by Trony
Get Avatar Link API was created by Trony
As title,
how get Avatar link in the default_profile_horizontal.php ?!?

I tried with:
<?php echo $this->profile->getAvatarURL ?>
 
<?php echo $this->getAvatarImage; ?>
 
<?php echo $this->profile->getAvatarImage; ?>

But don't work.

If I use
<?php echo $this->profile->getLink( $avatar ); ?>
it give ALL tags but i need only Avatar URL.

Thanks in advance for your Hints.

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

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

More
4 years 7 months ago #2 by xillibit
Replied by xillibit on topic Get Avatar Link API
Hello,

You should call avatarIntegration method to get right class, the you can call getLink() or getURL() methods, so try (the KunenaFactory::getAvatarIntegration() should be called only if it's not called before) :
<?php $avatar = KunenaFactory::getAvatarIntegration();
echo $avatar->getURL(); ?>


You can here all methods available by defaut for avatar : github.com/Kunena/Kunena-Forum/blob/deve...tegration/avatar.php

I don't provide support by PM, because this can be useful for someone else.
The following user(s) said Thank You: Trony

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

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
4 years 7 months ago #3 by Trony
Replied by Trony on topic Get Avatar Link API
Thanks so much.

I need it because I want integrate in Topics and Personal Profile this Microdata:

schema.org/Person

Now I try.

Thanks again Xillibit

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

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

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
4 years 7 months ago - 4 years 7 months ago #4 by Trony
Replied by Trony on topic Get Avatar Link API
Unfortunately doesn't work. ( I'm working on default_profile_horizontal.php)

It gives and URL as:
https://www.MYWEBSITE.org/media/kunena/avatars/resized/size90/TEMPLATE_NAME/s_nophoto.jpg

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

Last edit: 4 years 7 months ago by Trony.

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.122 seconds