By Anthony Glover on Tuesday, 15 July 2014
Posted in Technical Issues
Replies 1
Likes 0
Views 443
Votes 0
I was wondering if there was any functionality exposed which allows us to update the users avatar programmatically?

Specifically, I've got my own html5 image capture set up, and I want to send it to easysocial via AJAX. Currently I'm sending the data to my components controller and then trying to use createAvatarFromFile() within the controller but its NG.

Can anybody provide guidance on the best way to achieve this?
Hello Anthony,

You should take a look at the method @createAvatar in /components/com_easysocial/controllers/photos.php . Ideally, the logic is really simple

1. A photo record must be created first under the avatar photos album.
2. Based on the id of this particular record, you then initiate EasySocial to create an avatar of that particular photo.

The codes are pretty well documented You can try reading through it and I am pretty sure you could grasp it.
·
Tuesday, 15 July 2014 22:28
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post