Toksta Chat - Need help to intergrate with Elgg

Hi, i have been trying to set up Toksta Chat to work with my Elgg 1.0 site but have had no luck so far.

I have tried placing the two scripts in the footer.php, and although  the chat bar and "start chat" link are visible, the script is not recognizing the user / friends etc....and also confused how to set this to work for logged in users only.

I have pasted the two scripts below

 area of your source code, transferring necessary user data
//place this script on every page if the user is logged in !!!

$tk_name = "THE_USERNAME"; //<-- please set the username here
$tk_user_id = "THE_USER_ID"; //<-- please set the user ID here
$tk_gender = ""; //<-- optional (the gender of the user can be female or 'male')
$tk_age = ""; //<-- optional (the age of the user e.g. '23')
$tk_single = ""; //<-- optional (is the user single? 'Yes', 'no', '0' = no information)
$tk_profile_url = ""; //<-- optional (url to the users profile)
$tk_pic = ""; //<-- optional (url of the users picture)
$tk_city = ""; //<-- optional (city where the user is located, e.g. 'Berlin')
$tk_zip = ""; //<-- optional (users zip code, e.g. '92553')
$tk_country = ""; //<-- optional (country where the user is located, e.g. 'Germany')

//DO NOT EDIT THE FOLLOWING CODE!
$tk_user_data="name:".$tk_name. ";gender:".$tk_gender. ";age:".$tk_age. ";single:".$tk_single. ";url:".$tk_profile_url. ";pic:".$tk_pic. ";city:".$tk_city. ";tk_zip:".$tk_zip. ";country:".$tk_country;


//implements the js needed by the chatWatcher and to start a chat

$tk_hash = md5($tk_user_id.$tk_user_data."Nkk6uLcrMDGmB5SmJfBs");
$tk_js = "";
echo $tk_js; 
 Chatten";
echo $tk_link;
?> 

Can anyone help with this?

Diane

  • Hi everybody, i'm new at Elgg and pretty much have no idea how to do anything. I followed Brucepro scripts for the chat but placed it in html/views/default/spotlight/default.php.

    Now, the link appears in the spotlight but when i click on the link it says "an error ocurred. Chat-Session is invalid"

    What am I doing wrong? I am using the default theme

    Please help!

  • Well, its working for me. I think I will do a plugin so everyone can use it easily.(Depends on Demands)

  • Hi @Brucepro, I just downloaded and installed Toksta scripts as indicated in the Installtion instructions, and the "chat now" link appears on the user profile but when I click on the link, nothing happens except there is "Error on Page" at the bottom bar of the window.  I saw your response to @DIane007 below but I don't understand what to do.  Could you please give more details of what I need to do to make chat work?  Thanks so much!

    "I placed mine in the spotlight area of the new theme. :-)

    here is the code I used. Works great, not sure I like the pop up ads. Hope it helps....."

  • Hi @Brucepro, forgot to mention that I'm using Elgg 1.6.1 Thanks!