Help
Ask questions about how to do or fix things in Arrowchat
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 18 Jun 2012, 14:44

hello,

i m using your arrowchat, but i changed the video module... i just want to obtain the avatar image when a user log in to my new flash videochat, how can i retrive avatar ? i have this code :

// ########################## GET POST DATA ###########################
$room_id = $_GET['rid'];

if (strlen($room_id) == 9)
{
$room_id = "0".$room_id;
}

$username = get_username($userid);
$picture = get_avatar($image);


// ############################ START HTML ############################

THE USERNAME IS OK !
BUT THERE ANY AVATAR !!!!!!!!!!!! Do you know why ?

thank you for your help
User avatar
Jason
Customer
 
Posts: 2356
Joined: 12 Dec 2009, 16:06

 

by Jason 18 Jun 2012, 20:53

This JavaScript API can get the user's avatar link: http://www.arrowchat.com/documentation/?p=getuser
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 20 Jun 2012, 09:54

sorry but i dont understand where i nee to insert your code ? can you give me the file name ?

because my flash videochat is like this :

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="860" height="550" align="middle">
<param name="allowScriptAccess" value="sameDomain">
<param name="allowFullScreen" value="false">
<param name="movie" value="chat.swf?username={$username}&picture={$picture}">
<param name="menu" value="false">
<param name="quality" value="best">
<param name="bgcolor" value="#2D2D2D">
<embed src="chat.swf?username={$username}&picture={$picture}" menu="false" quality="best" bgcolor="#2D2D2D" width="860" height="550" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer">
</object>


so, username is ok, i just want to retrieve the avatar, what is the file i need to modify ?

thanks for you help
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 23 Jun 2012, 06:08

nobody can help me ?
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 24 Jun 2012, 06:52

probably i need to change something in includes/integration.pgp but what i need to change exactly if i wanna see the avatar ofr the user when user log-in ? please help, thanks
User avatar
Jason
Customer
 
Posts: 2356
Joined: 12 Dec 2009, 16:06

 

by Jason 24 Jun 2012, 07:07

It's most likely because $image is blank. Below is an example of how you would populate the $image variable.

Code: Select all
         $sql = get_user_details($userid);
         $result = $db->execute($sql);
         
         if ($result AND $db->count_select() > 0)
         {
            $row = $db->fetch_array($result);
            $user_avatar = $row['avatar'];
            $user_avatar = get_avatar($user_avatar, $userid);
         }


You can bypass the extra SQL call and just do $picture = get_avatar($userid, $userid); if the $image variable is just getting the user's ID.
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 25 Jun 2012, 11:07

sorry but i dont understand, my php acknowledge are very limited, if i give you my ftp access, can you do it for me ???? please, i cannot solve myself... please write me to yann@yannanderson.com then i can give you my ftp access... please, is the only thing i request you :-) because i dont know how and where insert this lines of code...

regards
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 25 Jun 2012, 11:14

i currently have this false code, in includes/integration.php /// i know this code is wrong, but i have a standard image, the same for each users (img-no-avatar.gif) but the code is ok for have allways the same image, i think i need just to change a little thing, can you say me what ? here is the code :

//////////////////////////////////////////////////////////////////////////////////

function get_avatar($image, $user_id)
{
global $base_url;

if (!empty($image))
{
return $base_url . "../" . $image;
}
else
{
return "http://www.yannanderson.com/site/arrowchat/admin/images/img-no-avatar.gif";
}
}

//////////////////////////////////////////////////////////////////////////////////

i think i just need to change something inside it ( i repeat the file is located in includes/integration.php)

can you write me the code please ????

thanks in advance for your precious help
User avatar
Jason
Customer
 
Posts: 2356
Joined: 12 Dec 2009, 16:06

 

by Jason 25 Jun 2012, 20:52

I won't know the code unless I take an in-depth look at your site (something that is covered by professional installation).
User avatar
djmoro
Customer
 
Posts: 11
Joined: 18 May 2012, 09:08

 

by djmoro 26 Jun 2012, 03:46

how can i obtain the professional installation ?
User avatar
Staff Bot
ArrowChat Team
 
Posts: 8996
Joined: 07 Nov 2012, 13:41

 

by Staff Bot 16 Dec 2014, 00:26

[b]This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.[/b]