By Tony on Friday, 11 March 2016
Likes 0
Views 1.5K
Votes 0
Hi,
is it possible to have Komento load the avatars from a joomla media file?
I mean that i'd like to not use other extension.
Just the user can upload his avatar on a file of my site or i load a serie of images inside a folder
then Komento gets it for its avatar.
Thanks a lot
Best regards
Unfortunately that was not possible to achieve this is because Komento do not have upload avatar feature, perhaps you can configure to use avatar integration with Gravatar?

So the user can upload their photo through Gravatar website.
·
Friday, 11 March 2016 15:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,
thanks for your help.
No i'did not want upload the images by Komento.
I can upload by other extension.
For example i can upload the avatar image by http://extensions.joomla.org/extensions/extension/clients-a-communities/user-management/cmavatar
But then i need to display the cmavatr on the Komento comment.
Cmacatar said that to display its avatar in other extensio you need to create the url by this small helper:
require_once JPATH_PLUGINS . '/user/cmavatar/helper.php';

$avatar = PlgUserCMAvatarHelper::getAvatar($userId);

$userId is the variable which holds the ID of the user of you want to get his/her avatar.
The result in $avatar is the path to the avatar of the user, for example “images/avatars/4d99b38d96ed65caf39fde008528f185.jpg”, you can do whatever you want with it like put it into <img> HTML element. If user doesn’t have avatar, the result is empty.

Then, where i can implement this on Komento.
I mean where is the file.php where Komento display the avatar?
·
Friday, 11 March 2016 15:37
·
0 Likes
·
0 Votes
·
0 Comments
·
You can open this file -> JoomlaFolder\components\com_komento\classes\profileVendors.php and compare with other how it get different extension avatar integration.

Since you already know how to get the avatar from cmavatar code.

Once you done it, you have to add 1 more avatar integration option from your backend file

JoomlaFolder\administrator\components\com_komento\views\integrations\tmpl\default_layout_avatars.php

Hope this help.
·
Friday, 11 March 2016 17:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,
thanks for your help.
But i found your solution too difficult for me.
So i found another way more simple to integrate CMAvatar with Komento.
It works like this: if a user have a CMAvatar saved on the site the avatar is showed if it has no CMavatar then Komento shows the Gravatar.
I've made that just with 4 rows of code inside 3 files of template>Kuro.
It works fine!
·
Saturday, 12 March 2016 19:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing with us Perhaps you want to post your solution here to share with others as well?
·
Sunday, 13 March 2016 21:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,
yes, sure!
here you are my solution:
First of all you have to install CMAvatar and do what the documentation tell to do after the installation.
Then you have to modify the following 3 Komento files.
·
Sunday, 13 March 2016 22:15
·
0 Likes
·
0 Votes
·
0 Comments
·
component>com_komento>themes>kuro>comment>item>avatar.php
·
Sunday, 13 March 2016 22:27
·
0 Likes
·
0 Votes
·
0 Comments
·
component>com_komento>themes>kuro>comment>form>avatar.php
·
Sunday, 13 March 2016 22:28
·
0 Likes
·
0 Votes
·
0 Comments
·
component>com_komento>themes>kuro>profile>avatar.php
·
Sunday, 13 March 2016 22:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing Tony
·
Monday, 14 March 2016 10:09
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post