Topic-icon k2 Avatar not showing in SClogin

Active Subscriptions:

None
8 years 4 months ago #56378 by robertobaggio
Dear Team,

I'm using you SClogin, and in parameters I try both "Enable Profile Picture:joomla" and "Enable Profile Picture: Social Network" but I don't see any k2 avatar showing up.
Could you please describe how can I get it showing?

I also followed an old article here www.sourcecoast.com/forums/jfbconnect/jf...t/4500-k2-and-avatar
but the solution is not updated I think,

Best,

Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #56387 by mel
For SCLogin, we currently only support JomSocial, EasySocial, Community Builder and Kunena avatars when the 'Joomla' profile picture is selected, based on whatever the 'Registration Component' is set to.

When the 'Social Network' profile picture is selected, JFBConnect tries to pick an avatar from a social networks that user has logged into.

-Melissa
The topic has been locked.
Active Subscriptions:

None
8 years 4 months ago #56389 by robertobaggio
Dear Melissa,
honestly I would expected something more from your response. In ths article (article of 2012)
www.sourcecoast.com/forums/jfbconnect/jf...t/4500-k2-and-avatar
is clearly stated "As for the K2 show avatar setting, it will be in an upcoming release.. definitely the 4.3 release."

I understand from your words that release is not ready, but I really would appreciate your help to show me how to manually do that, as Alex has done in the same article with another user. Alex solution unfortunately doesn't work anymore on the current release.

Best,

Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #56392 by alzander
Obviously it didn't make it into an updated release. I don't know why.. but it's also not a highly requested feature since the last time it was asked for was almost 4 years ago.

With that said, the code on that page looks to be modifying the same function (though maybe at a different line number). You said you tried it and it didn't work. What did happen when you tried?

Alex
The topic has been locked.
Active Subscriptions:

None
8 years 4 months ago #56398 by robertobaggio
Dear Alex,
the code of the mentioned post gives me the following error:
Fatal error: Call to undefined method modSCLoginHelper::getSocialAvatarImage() in C:\xampp\htdocs\mysite\modules\mod_sclogin\helper.php on line 385
I'll describe what I've done:

Around line 380 I found:

function getSocialAvatar($registerType, $profileLink)
{
$html = "";

if ($this->params->get('enableProfilePic') == 'social' && $this->isJFBConnectInstalled)

I replace that with:

function getSocialAvatar($registerType, $profileLink)
{
$html = "";
require_once(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'utilities.php');
return $this->getSocialAvatarImage( K2HelperUtilities::getAvatar($user->id) , '');

if ($this->params->get('enableProfilePic') == 'social' && $this->isJFBConnectInstalled)


This is what I've done. What do I miss?
Thanks,
Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #56409 by alzander
Ahh.. I see the issue. Can you change:
return $this->getSocialAvatarImage( K2HelperUtilities::getAvatar($user->id) , '');
To:
return $this->getAvatarHtml( K2HelperUtilities::getAvatar($user->id) , '', '');
Let us know how that goes. I've already added this to our to-do list for investigation on an upcoming release. I couldn't find the previous ticket. I'm still not sure what happened to it, but if we get confirmation from you that the above displays the avatar, we'll include it.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 4 months ago #56413 by robertobaggio
Dear Alex,
think we are on the right way, because the image is now showing, but unfortunately, it is not the right one.
It shows the generic k2 placeholder like if the logged user would have not a k2 avatar, but all my users have a k2 avatar.

this is the code on:

$html = "";

require_once(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'utilities.php');
return $this->getAvatarHtml( K2HelperUtilities::getAvatar($user->id) , '', '');

What do we miss?

Best,

Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #56427 by mel
That code does not have $user variable defined, so I added the second line of code below on my test site and my K2 avatar was shown properly.
require_once(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'utilities.php');
$user = JFactory::getUser();
return $this->getAvatarHtml( K2HelperUtilities::getAvatar($user->id) , '', '');

Let us know if this works for you.

-Melissa
The topic has been locked.
Active Subscriptions:

None
8 years 4 months ago #56428 by robertobaggio
Dear Melissa and Alex,
It works properly ! Thank you very much!
I would have only 3 more requests to make it fully fitting in my project:
- link the user k2 avatar (appearing now on SClogin) to the same user/author k2 page
- add a text-link in user/author k2 page (wherever you want on the page) linked to the jomsocial profile of the same author
- add a text-link in jomsocial user profile page (wherever you want on the page) linked to the same user/author k2 page
Off course, after that I'll leave a great review about your Support on the JED,
Best,
Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #56430 by alzander

Off course, after that I'll leave a great review about your Support on the JED,

We don't work off bribes. We'd love to have your review and we'll do what we can to help, but doing so isn't based on whether you will or won't leave a review.. though we'd appreciate it either way if you do since we're doing everything we can to get you going.

- link the user k2 avatar (appearing now on SClogin) to the same user/author k2 page

We'll have to look into the exact code to do this. If you can provide an example URL of what it should look like, that will help as it's really just passing that URL into the 2nd parameter of the getAvatarHTML function that we're already using.

- add a text-link in user/author k2 page (wherever you want on the page) linked to the jomsocial profile of the same author

You should create a User Menu and have SCLogin display that menu to your users to add additional links to the login module.

- add a text-link in jomsocial user profile page (wherever you want on the page) linked to the same user/author k2 page

See above.

I hope that helps with most of your questions, but let us know about that K2 link and anything else you need.

Thanks,
Alex
The topic has been locked.