You have to now send this data (country) in the response .
Open freichat/server/freichat.php
Around line 426 , replace
$freichat->userdata[] = array(
"username" => $guest,
"userid" => $res['session_id'],
"avatar" => $avatar_url,
"img_url" => $img_url,
"show_name" => $show_name,
"status_mesg" => $res['status_mesg'],
"profile_link" => $profile_link,
);
with
$freichat->userdata[] = array(
"username" => $guest,
"userid" => $res['session_id'],
"avatar" => $avatar_url,
"img_url" => $img_url,
"show_name" => $show_name,
"status_mesg" => $res['status_mesg'],
"profile_link" => $profile_link,
"country" => $res['cb_country']
);
Now, open freichat/client/freichat.js
Around line 1145 , go to FreiChat.create_users()
You need to edit the variable
users_html as required .
Your country name is stored in
userdata[users_len].country
You have to now send this data (country) in the response .
Open freichat/server/freichat.php
Around line 426 , replace
<code>
$freichat->userdata[] = array(
"username" => $guest,
"userid" => $res['session_id'],
"avatar" => $avatar_url,
"img_url" => $img_url,
"show_name" => $show_name,
"status_mesg" => $res['status_mesg'],
"profile_link" => $profile_link,
);
</code>
with
<code>
$freichat->userdata[] = array(
"username" => $guest,
"userid" => $res['session_id'],
"avatar" => $avatar_url,
"img_url" => $img_url,
"show_name" => $show_name,
"status_mesg" => $res['status_mesg'],
"profile_link" => $profile_link,
"country" => $res['cb_country']
);
</code>
Now, open freichat/client/freichat.js
Around line 1145 , go to FreiChat.create_users()
You need to edit the variable <u>users_html</u> as required .
Your country name is stored in <u>userdata[users_len].country</u>
Necessity is the mother of all inventions!