Hello @all
I've added freichat to my backend. All is ok. But I can't see the names of the user. I only see the name guest-....
I have tried to configure that. But it won't run.
$ses = $_SESSION[SESS_NAME]['user_id'];
function freichatx_get_hash($ses){
global $APR;
if(is_file("$APR/freichat/hardcode.php")) {
require "$APR/freichat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else {
echo "<script>alert('module freichatx says: hardcode.php file not found!');</script>";
}
return 0;
}
$freichat_hash = freichatx_get_hash($ses);
$freichat_ses = $ses;
.....
<script type="text/javascript" language="javascipt" src="%7B%24APH%7D/freichat/client/main.php?id=%7B%24freichat_ses%7D&xhash=%7B%24freichat_hash%7D"></script>
hardcode.php:
$dsn='mysql:host=localhost;dbname=nk'; //DSN
$db_user='nk'; //DB username
$db_pass='...'; //DB password
$driver='Custom'; //Integration driver
$db_prefix='frei_'; //prefix used for tables in database
$uid='51d6b0722476a'; //Any random unique number
$PATH = 'freichat/'; // Use this only if you have placed the freichat folder somewhere else
$installed=false; //make it false if you want to reinstall freichat
$admin_pswd='testing'; //backend password
$debug = false;
$custom_error_handling='NO'; // used during custom installation
$use_cookie=true;
/* email plugin */
$smtp_username = '';
$smtp_password = '';
$force_load_jquery = 'YES';
/* Custom driver */
$usertable='cms_session'; //specifies the name of the table in which your user information is stored.
$row_username='name'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='user_id'; //specifies the name of the field in which the user's id is stored (usually id or userid)
$avatar_field_name = 'avatar';in the table cms_session are all users stored who are logged in. After login I can see the chatwindow but everybody has the name 'guest-...'
$ses is initiated with a integrer and is the correct user_id. Also the values of $usertable, $row_username, $row_userid are correct
can anyone help??
thanks a lot!
Hello @all
I've added freichat to my backend. All is ok. But I can't see the names of the user. I only see the name guest-....
I have tried to configure that. But it won't run.
&lt;code&gt;
$ses = $_SESSION[SESS_NAME]['user_id'];
function freichatx_get_hash($ses){
global $APR;
if(is_file("$APR/freichat/hardcode.php")) {
require "$APR/freichat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else {
echo "&lt;script&gt;alert('module freichatx says: hardcode.php file not found!');&lt;/script&gt;";
}
return 0;
}
$freichat_hash = freichatx_get_hash($ses);
$freichat_ses = $ses;
.....
&lt;script type="text/javascript" language="javascipt" src="{$APH}/freichat/client/main.php?id={$freichat_ses}&xhash={$freichat_hash}"&gt;&lt;/script&gt;
hardcode.php:
$dsn='mysql:host=localhost;dbname=nk'; //DSN
$db_user='nk'; //DB username
$db_pass='...'; //DB password
$driver='Custom'; //Integration driver
$db_prefix='frei_'; //prefix used for tables in database
$uid='51d6b0722476a'; //Any random unique number
$PATH = 'freichat/'; // Use this only if you have placed the freichat folder somewhere else
$installed=false; //make it false if you want to reinstall freichat
$admin_pswd='testing'; //backend password
$debug = false;
$custom_error_handling='NO'; // used during custom installation
$use_cookie=true;
/* email plugin */
$smtp_username = '';
$smtp_password = '';
$force_load_jquery = 'YES';
/* Custom driver */
$usertable='cms_session'; //specifies the name of the table in which your user information is stored.
$row_username='name'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='user_id'; //specifies the name of the field in which the user's id is stored (usually id or userid)
$avatar_field_name = 'avatar';
&lt;/code&gt;
in the table cms_session are all users stored who are logged in. After login I can see the chatwindow but everybody has the name 'guest-...'
$ses is initiated with a integrer and is the correct user_id. Also the values of $usertable, $row_username, $row_userid are correct
can anyone help??
thanks a lot!