Jomsocial avatar into Muscol

0
Good day again everyone!

This is more of a question than a support request. If support team can give me a hint or idea of how to implement the avatar of user into Muscol would be great.
A customization i made on field 'Artist' to be selected automatically from an entry filled in at the Jomsocial's account registration, so that the value will stay the same for the Artist in Muscol. Now another thing is that i somehow made it to display the user's avatar, but not really. It only displays own avatar, not the poster's avatar (the user who posted it). Can i please have a guidance where to look and start? I do not expect the ready-made custom code but some advice would be fine about how to get the function where it display's the 'actor''s avatar, not the viewer's avatar.

Accepted Answer

Tuesday, February 10 2015, 11:37 AM - #Permalink
0
Nevermind, i got it working.

$user = CFactory::getUser($this->artist->user_id);
include_once JPATH_ROOT.'/components/com_community/libraries/core.php';
$jomsocialavatar = $user->getAvatar($user_id);

The reply is currently minimized Show
Responses (8)
  • Accepted Answer

    Monday, February 09 2015, 12:28 PM - #Permalink
    0
    hello!

    well, if you're in the ARTIST page, then you will have the info of the poster ID on the variable $this->artist->user_id

    this will give you the ID of the poster, not the user viewing the page.

    does that help?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 09 2015, 05:08 PM - #Permalink
    0
    MMM, somehow it is still not getting it:

    include_once JPATH_ROOT.'/components/com_community/libraries/core.php';
    $user = CFactory::getRequestUser($userId);
    $artistphoto = $user->getAvatar($this->artist->user_id);

    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 09 2015, 07:04 PM - #Permalink
    0
    I don't know about the JomSocial code, but..

    1. is the "/" character in front of the src required?
    what is the $userId you are passing to thegetRequestUser() function?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 10 2015, 09:13 AM - #Permalink
    0
    Hello again and good morning! This is the API they publish on their page for user id and user avatar.
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 10 2015, 09:13 AM - #Permalink
    0
    and this for avatar
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 10 2015, 10:39 AM - #Permalink
    0
    Actually artist ID and Jomsocial ID are different. So i am still struggling to get these 2 work together, so that i can show the avatar of the author which submitted the song.
    The reply is currently minimized Show
  • Accepted Answer

    amelcher
    amelcher
    Offline
    Sunday, March 08 2015, 03:39 PM - #Permalink
    0
    Socialcrowd,

    I have been trying to integrate the jomsocial username into the add new song page instead of creating a whole new artist profile. How were you able to do that? If it helps sweeten the deal, I was able to add the actual music player to the jomsocial profile page for each song the user adds... I can give you the plugin file if you want. :)
    Adam
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 09 2015, 09:11 AM - #Permalink
    0
    Hi Adam. Well, that's as well an interesting feature you created. And sure, you can share it if you don't mind. It can come in great use if i have to be honest. And thanks, that's very generous of you. :)
    The reply is currently minimized Show
Your Reply