Forum

This forum is powered by Mingle Forum — Cartpauj.com

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.

Pages: [1]
Author Topic: How to get Mingle profile avatar pic on CometChat avatar?
Jonathan_M-
unoz
Beginner
Posts: 7
Post How to get Mingle profile avatar pic on CometChat avatar?
on: Dec 13, 12:40 PM

I am using CometChat on my site and its not reading the mingle avatar what do i need to do to get it to get the users avatars? I saw that one of the users that is logged in with his yahoo email had a Gravatar image for his mingle image. Only that avatar image is visible in the chat everyone else has the default image. What do i have to do so all the users avatars are visible in the chat? This is what my integration.php looks like the functions what do i need to change? so the avatars appear as the mingle avatars?

http://pastebin.com/Eis8i3Gd

I think it has to do something with this?

function getAvatar($data) {

        $data = explode('|',$data);
        $id = $data[0];

        return 'http://www.gravatar.com/avatar/'.md5($data1).'?d=wavatar&s=80';
}
Jonathan_M-
unoz
Beginner
Posts: 7
Post Re: How to get Mingle profile avatar pic on CometChat avatar?
on: Dec 16, 07:24 PM

anyone? i tried

function getAvatar($data) {

	$data = explode('|',$data);
	$id = $data[0];

	return 'http://www.somosguatemala.com/wp-content/uploads/mingle/avatars/'  ; 

}

but dont know how to get specific users avatar for mingle

sheffieldl-
ad
Beginner
Posts: 6
Post Re: How to get Mingle profile avatar pic on CometChat avatar?
on: Mar 09, 10:14 AM

function get_avatar($user_id, $size = 60)
You can change the size value to suit your needs.
I think thats how you grab the users avatar.
Try the following, I can't guarentee it will work.

function get_avatar($user_id, $size = 60){

	$data = $user_id
	$id = $data[0];
}

I honestly do not know if the comet chat code will be able to see the function get_avatar. I should imagine it won't and I don't know how to solve that the main problem.
I'm a very very very novice coder (started getting into php/sql last week) but I do know you don't need to change the gravatar URL to your mingle avatars folder.
You should implement an if statement so if the user has no mingle avatar it still looks for a gravatar one.
Just an idea, I'm sure someone with more knowledge can advise more.
hope it helps a little.
Good luck, let us know if you figure it out :)

sheffieldl-
ad
Beginner
Posts: 6
Post Re: How to get Mingle profile avatar pic on CometChat avatar?
on: Mar 09, 10:26 AM

OOPSIE! I didn't realise the thread was over 2 months old :/
Would be interestring to see if he got it to work though.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.33 ; Page loaded in: 0.072 seconds.

Comments are closed.