Page 1 of 1
avatar retrive
PostPosted: 18 Jun 2012, 14:44
by djmoro
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
PostPosted: 18 Jun 2012, 20:53
by Jason
This JavaScript API can get the user's avatar link:
http://www.arrowchat.com/documentation/?p=getuser
PostPosted: 20 Jun 2012, 09:54
by djmoro
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
PostPosted: 23 Jun 2012, 06:08
by djmoro
nobody can help me ?
PostPosted: 24 Jun 2012, 06:52
by djmoro
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
PostPosted: 24 Jun 2012, 07:07
by Jason
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.
PostPosted: 25 Jun 2012, 11:07
by djmoro
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
PostPosted: 25 Jun 2012, 11:14
by djmoro
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
PostPosted: 25 Jun 2012, 20:52
by Jason
I won't know the code unless I take an in-depth look at your site (something that is covered by professional installation).
PostPosted: 26 Jun 2012, 03:46
by djmoro
how can i obtain the professional installation ?
Topic Closed
PostPosted: 16 Dec 2014, 00:26
by Staff Bot
[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]