FreiChat related discussions
How do you integrate FreiChat v10.0 with osDate?

Hi,

How do you integrate FreiChat v10.0 with osDate please.

I had to use the custom setup as the osdate integration seems to be missing and I have FreiChat showing for guests but can't get it working for the members (users).

Regards, Phill

Hi, How do you integrate FreiChat v10.0 with osDate please. I had to use the custom setup as the osdate integration seems to be missing and I have FreiChat showing for guests but can't get it working for the members (users). Regards, Phill

I did not find much documentation on osdate.

You need to first give the table information on where the users are stored in the file freichat/hardcode.php

I did not find much documentation on osdate. You need to first give the table information on where the users are stored in the file freichat/hardcode.php

Hi,

Here is a copy of the file freichat/hardcode.php

 /* Data base details */
$dsn='mysql:host=****************;dbname=*********'; //DSN
$db_user='***********'; //DB username 
$db_pass='***********'; //DB password 
$driver='Custom'; //Integration driver
$db_prefix=' '; //prefix used for tables in database
$uid='57b799726f8b9'; //Any random unique number

$connected='YES'; //only for custom installation

$PATH = 'freichat/'; // Use this only if you have placed the freichat folder somewhere else
$installed=true; //make it false if you want to reinstall freichat
$admin_pswd='**********'; //backend password 

$debug = false;
$custom_error_handling='YES'; // used during custom installation

$use_cookie='false';

/* email plugin */
$smtp_username = '';
$smtp_password = '';

$force_load_jquery = 'NO';

/* Custom driver */
$usertable='osdate_user'; //specifies the name of the table in which your user information is stored. 
$row_username='username'; //specifies the name of the field in which the user's name/display name is stored. 
$row_userid='id'; //specifies the name of the field in which the user's id is stored (usually id or userid)

$avatar_table_name='members'; //specifies the table where avatar information is stored
$avatar_column_name='avatar'; //specifies the column name where the avatar url is stored
$avatar_userid='id'; //specifies the userid  to the user to get the user's avatar
$avatar_reference_user='id'; //specifies the reference to the user to get the user's avatar in user table 
$avatar_reference_avatar='id'; //specifies the reference to the user to get the user's avatar in avatar
$avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not change

Here is also a copy of the user osdate Tables

--
-- Table structure for table `osdate_user`
--
CREATE TABLE `osdate_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `active` tinyint(1) DEFAULT '0',
  `username` varchar(25) NOT NULL DEFAULT '',
  `password` varchar(32) NOT NULL DEFAULT '',
  `lastvisit` int(11) NOT NULL DEFAULT '0',
  `regdate` int(11) NOT NULL DEFAULT '0',
  `level` tinyint(4) DEFAULT '4',
  `timezone` decimal(5,2) DEFAULT '0.00',
  `allow_viewonline` tinyint(1) DEFAULT '1',
  `rank` int(11) DEFAULT '0',
  `email` varchar(255) DEFAULT NULL,
  `country` varchar(11) DEFAULT '',
  `actkey` varchar(32) DEFAULT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `lastname` varchar(50) DEFAULT NULL,
  `gender` char(1) NOT NULL DEFAULT 'M',
  `lookgender` char(1) DEFAULT '',
  `lookagestart` int(11) DEFAULT '0',
  `lookageend` int(11) DEFAULT '0',
  `address_line1` varchar(100) DEFAULT NULL,
  `address_line2` varchar(100) DEFAULT NULL,
  `state_province` varchar(100) DEFAULT NULL,
  `county` varchar(100) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `zip` varchar(30) DEFAULT NULL,
  `birth_date` date NOT NULL,
  `lookcountry` varchar(255) DEFAULT '',
  `lookstate_province` varchar(100) DEFAULT NULL,
  `lookcounty` varchar(100) DEFAULT NULL,
  `lookcity` varchar(100) DEFAULT NULL,
  `lookzip` varchar(100) DEFAULT NULL,
  `lookradius` varchar(5) DEFAULT NULL,
  `radiustype` varchar(5) DEFAULT 'miles',
  `picture` char(1) DEFAULT '0',
  `pictures_cnt` int(4) DEFAULT '0',
  `videos_cnt` int(4) DEFAULT '0',
  `about_me` text,
  `couple_usernames` varchar(255) DEFAULT NULL,
  `zip_latitude` float DEFAULT NULL,
  `zip_longitude` float DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'approval',
  `levelend` int(11) DEFAULT NULL,
  `regIP` varchar(100) DEFAULT NULL,
  `lastLoginIP` varchar(100) DEFAULT NULL,
  `p_firstname` varchar(50) DEFAULT NULL,
  `p_lastname` varchar(50) DEFAULT NULL,
  `p_gender` char(1) DEFAULT NULL,
  `p_birth_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `username` (`username`),
  KEY `email` (`email`),
  KEY `fullname` (`firstname`),
  KEY `city` (`city`),
  KEY `zip` (`zip`),
  KEY `country` (`country`),
  KEY `lastvisit` (`lastvisit`),
  KEY `lookgender` (`lookgender`),
  KEY `state_province` (`state_province`),
  KEY `lookcountry` (`lookcountry`),
  KEY `lookageend` (`lookageend`),
  KEY `lookagestart` (`lookagestart`),
  KEY `status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `osdate_user`
--
INSERT INTO `osdate_user` (`id`, `active`, `username`, `password`, `lastvisit`, `regdate`, `level`, `timezone`, `allow_viewonline`, `rank`, `email`, `country`, `actkey`, `firstname`, `lastname`, `gender`, `lookgender`, `lookagestart`, `lookageend`, `address_line1`, `address_line2`, `state_province`, `county`, `city`, `zip`, `birth_date`, `lookcountry`, `lookstate_province`, `lookcounty`, `lookcity`, `lookzip`, `lookradius`, `radiustype`, `picture`, `pictures_cnt`, `videos_cnt`, `about_me`, `couple_usernames`, `zip_latitude`, `zip_longitude`, `status`, `levelend`, `regIP`, `lastLoginIP`, `p_firstname`, `p_lastname`, `p_gender`, `p_birth_date`) VALUES
(5, 1, 'faisal', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 2, '-5.00', 1, 1, 'faisal@{domain}', 'GB', '6d25ae9a65ed9ac4ab63fed963084f49', 'Faisal', 'Shahzad', 'M', 'F', 20, 31, '54 D Abc Colony', '', 'CI', NULL, 'Carina Bay', '4554654', '1980-10-06', '', '', NULL, '', '', NULL, 'miles', '0', 1, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(92, 1, 'Zehta', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-12.00', 1, 1, 'zehta@{domain}', 'US', '63d1e03e4e1f777e3bacc225347d7acc', 'Zehta', 'Jones', 'M', 'F', 0, 99, '', '', 'AL', NULL, 'Alabama', '54000', '1960-01-01', 'AA', '', NULL, '', '', NULL, 'miles', '0', 0, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(63, 1, 'Aila12', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'ailacabral@{domain}', 'US', '44e347e0e9f8d9d6051cafa8258f298c', 'Aila', 'Cabral', 'F', 'M', 18, 35, 'asdas', '', 'AL', NULL, 'Manhattan', '10002', '1970-01-01', '', 'AA', NULL, '', '', NULL, 'miles', '0', 1, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(64, 1, 'Anna14', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'anna@{domain}', 'US', '55e0de72a3490db4d5ad96451faef51c', 'Anna', 'Gates', 'F', 'M', 18, 35, '', '', '', NULL, 'new york', '10001', '1987-01-01', 'AA', '', NULL, '', '', NULL, 'miles', '0', 0, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(90, 1, 'JaruGT', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'JaruGT@{domain}', 'US', '641bccf3a11bae9c18ca180f5fd66a3d', 'Gilen', 'Cock', 'M', 'F', 0, 50, '', '', 'FL', NULL, 'Bradenton', '31556', '1971-11-01', 'AA', '', NULL, '', '', NULL, 'miles', '0', 1, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(88, 1, 'BigWill', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'bigwill@{domain}', 'US', '4714ad92f21f7abf27f497217740e571', 'Chris', 'Gayl', 'M', 'F', 18, 40, '', '', 'AL', NULL, 'Fort Richardson', '31556', '1987-07-01', '', '', NULL, '', '', NULL, 'miles', '0', 1, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(60, 1, 'mariah', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'mariah@{domain}', 'US', 'f090658003c569a2a773806c73105879', 'Mariah', 'Carey', 'F', 'M', 18, 99, '', '', 'AL', NULL, 'Voice City', '10001', '1980-01-01', '', '', NULL, '', '', NULL, 'miles', '0', 0, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(77, 1, 'Manuella', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'Manuella@{domain}', 'US', '157728a5671a13c95e421006a0b36226', 'Manuella', 'Keller', 'F', 'M', 18, 35, '', '', 'AL', NULL, 'new york', '10001', '1981-01-25', '', '', NULL, '', '', NULL, 'miles', '0', 1, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(78, 1, 'mimijones', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'jones@{domain}', 'US', '47eaa03002e256a19ec83c61fe06acc7', 'Mimi', 'Jones', 'F', 'M', 18, 35, '', '', 'AL', NULL, 'new york', '10001', '1982-07-01', '', '', NULL, '', '', NULL, 'miles', '0', 1, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(81, 1, 'Smailin', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'Smailin@{domain}', 'US', 'b0173136ba8e2807997fec80b2cfcc34', 'Smailin', 'Pires', 'F', 'M', 18, 40, '', '', 'AL', NULL, 'new york', '10001', '1985-01-25', '', 'AA', NULL, '', '', NULL, 'miles', '0', 0, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL),
(82, 1, 'Monique', 'ddbf0cb18c4b78d40b6d36c418919b4c', 1464609609, 1464609609, 1, '-5.00', 1, 1, 'Monique@{domain}', 'US', '7bcc17e3b7317e453d6001c63295f6dc', 'Monique', 'kahn', 'F', 'M', 18, 29, '', '', 'AL', NULL, 'new york', '10001', '1978-07-01', '', 'AA', NULL, '', '', NULL, 'miles', '0', 0, 0, NULL, NULL, NULL, NULL, 'active', 1465214409, NULL, NULL, NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

I put this in the index.php


 //FreiChat STARTS HERE

if($Username_And_Password_Match)
{
   $_SESSION['userid'] = $users['id']; // Modify to suit your requirements
}

$ses = null; // Return null if user is not logged in 

if(isset($_SESSION['userid']))
{ 
  if($_SESSION['userid'] != null) // Here null is guest 
  { 
   $ses=$_SESSION['userid']; //LOOK, now userid will be passed to FreiChat 
  } 
} 

if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

       if(is_file("/mydomain.com/freichat/hardcode.php")){

               require "/mydomain.com/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 ENDS HERE

And lastly I put the script index_header.tpl in the template

{literal}<script type="text/javascript" language="javascipt" src="http://mydomain.com/freichat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>{/literal}
<link rel="stylesheet" href="http://mydomain.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">

Please help me fix this?

You can also find osdate info at http://www.osdateforum.com/index.php

Regards, Phill

Hi, Here is a copy of the file freichat/hardcode.php ```` /* Data base details */ $dsn=&#039;mysql:host=****************;dbname=*********&#039;; //DSN $db_user=&#039;***********&#039;; //DB username $db_pass=&#039;***********&#039;; //DB password $driver=&#039;Custom&#039;; //Integration driver $db_prefix=&#039; &#039;; //prefix used for tables in database $uid=&#039;57b799726f8b9&#039;; //Any random unique number $connected=&#039;YES&#039;; //only for custom installation $PATH = &#039;freichat/&#039;; // Use this only if you have placed the freichat folder somewhere else $installed=true; //make it false if you want to reinstall freichat $admin_pswd=&#039;**********&#039;; //backend password $debug = false; $custom_error_handling=&#039;YES&#039;; // used during custom installation $use_cookie=&#039;false&#039;; /* email plugin */ $smtp_username = &#039;&#039;; $smtp_password = &#039;&#039;; $force_load_jquery = &#039;NO&#039;; /* Custom driver */ $usertable=&#039;osdate_user&#039;; //specifies the name of the table in which your user information is stored. $row_username=&#039;username&#039;; //specifies the name of the field in which the user&#039;s name/display name is stored. $row_userid=&#039;id&#039;; //specifies the name of the field in which the user&#039;s id is stored (usually id or userid) $avatar_table_name=&#039;members&#039;; //specifies the table where avatar information is stored $avatar_column_name=&#039;avatar&#039;; //specifies the column name where the avatar url is stored $avatar_userid=&#039;id&#039;; //specifies the userid to the user to get the user&#039;s avatar $avatar_reference_user=&#039;id&#039;; //specifies the reference to the user to get the user&#039;s avatar in user table $avatar_reference_avatar=&#039;id&#039;; //specifies the reference to the user to get the user&#039;s avatar in avatar $avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not change ```` Here is also a copy of the **user osdate Tables** ```` -- -- Table structure for table `osdate_user` -- CREATE TABLE `osdate_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `active` tinyint(1) DEFAULT &#039;0&#039;, `username` varchar(25) NOT NULL DEFAULT &#039;&#039;, `password` varchar(32) NOT NULL DEFAULT &#039;&#039;, `lastvisit` int(11) NOT NULL DEFAULT &#039;0&#039;, `regdate` int(11) NOT NULL DEFAULT &#039;0&#039;, `level` tinyint(4) DEFAULT &#039;4&#039;, `timezone` decimal(5,2) DEFAULT &#039;0.00&#039;, `allow_viewonline` tinyint(1) DEFAULT &#039;1&#039;, `rank` int(11) DEFAULT &#039;0&#039;, `email` varchar(255) DEFAULT NULL, `country` varchar(11) DEFAULT &#039;&#039;, `actkey` varchar(32) DEFAULT NULL, `firstname` varchar(50) DEFAULT NULL, `lastname` varchar(50) DEFAULT NULL, `gender` char(1) NOT NULL DEFAULT &#039;M&#039;, `lookgender` char(1) DEFAULT &#039;&#039;, `lookagestart` int(11) DEFAULT &#039;0&#039;, `lookageend` int(11) DEFAULT &#039;0&#039;, `address_line1` varchar(100) DEFAULT NULL, `address_line2` varchar(100) DEFAULT NULL, `state_province` varchar(100) DEFAULT NULL, `county` varchar(100) DEFAULT NULL, `city` varchar(100) DEFAULT NULL, `zip` varchar(30) DEFAULT NULL, `birth_date` date NOT NULL, `lookcountry` varchar(255) DEFAULT &#039;&#039;, `lookstate_province` varchar(100) DEFAULT NULL, `lookcounty` varchar(100) DEFAULT NULL, `lookcity` varchar(100) DEFAULT NULL, `lookzip` varchar(100) DEFAULT NULL, `lookradius` varchar(5) DEFAULT NULL, `radiustype` varchar(5) DEFAULT &#039;miles&#039;, `picture` char(1) DEFAULT &#039;0&#039;, `pictures_cnt` int(4) DEFAULT &#039;0&#039;, `videos_cnt` int(4) DEFAULT &#039;0&#039;, `about_me` text, `couple_usernames` varchar(255) DEFAULT NULL, `zip_latitude` float DEFAULT NULL, `zip_longitude` float DEFAULT NULL, `status` varchar(20) NOT NULL DEFAULT &#039;approval&#039;, `levelend` int(11) DEFAULT NULL, `regIP` varchar(100) DEFAULT NULL, `lastLoginIP` varchar(100) DEFAULT NULL, `p_firstname` varchar(50) DEFAULT NULL, `p_lastname` varchar(50) DEFAULT NULL, `p_gender` char(1) DEFAULT NULL, `p_birth_date` date DEFAULT NULL, PRIMARY KEY (`id`), KEY `username` (`username`), KEY `email` (`email`), KEY `fullname` (`firstname`), KEY `city` (`city`), KEY `zip` (`zip`), KEY `country` (`country`), KEY `lastvisit` (`lastvisit`), KEY `lookgender` (`lookgender`), KEY `state_province` (`state_province`), KEY `lookcountry` (`lookcountry`), KEY `lookageend` (`lookageend`), KEY `lookagestart` (`lookagestart`), KEY `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `osdate_user` -- INSERT INTO `osdate_user` (`id`, `active`, `username`, `password`, `lastvisit`, `regdate`, `level`, `timezone`, `allow_viewonline`, `rank`, `email`, `country`, `actkey`, `firstname`, `lastname`, `gender`, `lookgender`, `lookagestart`, `lookageend`, `address_line1`, `address_line2`, `state_province`, `county`, `city`, `zip`, `birth_date`, `lookcountry`, `lookstate_province`, `lookcounty`, `lookcity`, `lookzip`, `lookradius`, `radiustype`, `picture`, `pictures_cnt`, `videos_cnt`, `about_me`, `couple_usernames`, `zip_latitude`, `zip_longitude`, `status`, `levelend`, `regIP`, `lastLoginIP`, `p_firstname`, `p_lastname`, `p_gender`, `p_birth_date`) VALUES (5, 1, &#039;faisal&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 2, &#039;-5.00&#039;, 1, 1, &#039;faisal@{domain}&#039;, &#039;GB&#039;, &#039;6d25ae9a65ed9ac4ab63fed963084f49&#039;, &#039;Faisal&#039;, &#039;Shahzad&#039;, &#039;M&#039;, &#039;F&#039;, 20, 31, &#039;54 D Abc Colony&#039;, &#039;&#039;, &#039;CI&#039;, NULL, &#039;Carina Bay&#039;, &#039;4554654&#039;, &#039;1980-10-06&#039;, &#039;&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 1, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (92, 1, &#039;Zehta&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-12.00&#039;, 1, 1, &#039;zehta@{domain}&#039;, &#039;US&#039;, &#039;63d1e03e4e1f777e3bacc225347d7acc&#039;, &#039;Zehta&#039;, &#039;Jones&#039;, &#039;M&#039;, &#039;F&#039;, 0, 99, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;Alabama&#039;, &#039;54000&#039;, &#039;1960-01-01&#039;, &#039;AA&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 0, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (63, 1, &#039;Aila12&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;ailacabral@{domain}&#039;, &#039;US&#039;, &#039;44e347e0e9f8d9d6051cafa8258f298c&#039;, &#039;Aila&#039;, &#039;Cabral&#039;, &#039;F&#039;, &#039;M&#039;, 18, 35, &#039;asdas&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;Manhattan&#039;, &#039;10002&#039;, &#039;1970-01-01&#039;, &#039;&#039;, &#039;AA&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 1, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (64, 1, &#039;Anna14&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;anna@{domain}&#039;, &#039;US&#039;, &#039;55e0de72a3490db4d5ad96451faef51c&#039;, &#039;Anna&#039;, &#039;Gates&#039;, &#039;F&#039;, &#039;M&#039;, 18, 35, &#039;&#039;, &#039;&#039;, &#039;&#039;, NULL, &#039;new york&#039;, &#039;10001&#039;, &#039;1987-01-01&#039;, &#039;AA&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 0, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (90, 1, &#039;JaruGT&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;JaruGT@{domain}&#039;, &#039;US&#039;, &#039;641bccf3a11bae9c18ca180f5fd66a3d&#039;, &#039;Gilen&#039;, &#039;Cock&#039;, &#039;M&#039;, &#039;F&#039;, 0, 50, &#039;&#039;, &#039;&#039;, &#039;FL&#039;, NULL, &#039;Bradenton&#039;, &#039;31556&#039;, &#039;1971-11-01&#039;, &#039;AA&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 1, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (88, 1, &#039;BigWill&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;bigwill@{domain}&#039;, &#039;US&#039;, &#039;4714ad92f21f7abf27f497217740e571&#039;, &#039;Chris&#039;, &#039;Gayl&#039;, &#039;M&#039;, &#039;F&#039;, 18, 40, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;Fort Richardson&#039;, &#039;31556&#039;, &#039;1987-07-01&#039;, &#039;&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 1, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (60, 1, &#039;mariah&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;mariah@{domain}&#039;, &#039;US&#039;, &#039;f090658003c569a2a773806c73105879&#039;, &#039;Mariah&#039;, &#039;Carey&#039;, &#039;F&#039;, &#039;M&#039;, 18, 99, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;Voice City&#039;, &#039;10001&#039;, &#039;1980-01-01&#039;, &#039;&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 0, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (77, 1, &#039;Manuella&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;Manuella@{domain}&#039;, &#039;US&#039;, &#039;157728a5671a13c95e421006a0b36226&#039;, &#039;Manuella&#039;, &#039;Keller&#039;, &#039;F&#039;, &#039;M&#039;, 18, 35, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;new york&#039;, &#039;10001&#039;, &#039;1981-01-25&#039;, &#039;&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 1, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (78, 1, &#039;mimijones&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;jones@{domain}&#039;, &#039;US&#039;, &#039;47eaa03002e256a19ec83c61fe06acc7&#039;, &#039;Mimi&#039;, &#039;Jones&#039;, &#039;F&#039;, &#039;M&#039;, 18, 35, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;new york&#039;, &#039;10001&#039;, &#039;1982-07-01&#039;, &#039;&#039;, &#039;&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 1, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (81, 1, &#039;Smailin&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;Smailin@{domain}&#039;, &#039;US&#039;, &#039;b0173136ba8e2807997fec80b2cfcc34&#039;, &#039;Smailin&#039;, &#039;Pires&#039;, &#039;F&#039;, &#039;M&#039;, 18, 40, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;new york&#039;, &#039;10001&#039;, &#039;1985-01-25&#039;, &#039;&#039;, &#039;AA&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 0, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL), (82, 1, &#039;Monique&#039;, &#039;ddbf0cb18c4b78d40b6d36c418919b4c&#039;, 1464609609, 1464609609, 1, &#039;-5.00&#039;, 1, 1, &#039;Monique@{domain}&#039;, &#039;US&#039;, &#039;7bcc17e3b7317e453d6001c63295f6dc&#039;, &#039;Monique&#039;, &#039;kahn&#039;, &#039;F&#039;, &#039;M&#039;, 18, 29, &#039;&#039;, &#039;&#039;, &#039;AL&#039;, NULL, &#039;new york&#039;, &#039;10001&#039;, &#039;1978-07-01&#039;, &#039;&#039;, &#039;AA&#039;, NULL, &#039;&#039;, &#039;&#039;, NULL, &#039;miles&#039;, &#039;0&#039;, 0, 0, NULL, NULL, NULL, NULL, &#039;active&#039;, 1465214409, NULL, NULL, NULL, NULL, NULL, NULL); -- -------------------------------------------------------- ```` I put this in the** index.php** ```` //FreiChat STARTS HERE if($Username_And_Password_Match) { $_SESSION[&#039;userid&#039;] = $users[&#039;id&#039;]; // Modify to suit your requirements } $ses = null; // Return null if user is not logged in if(isset($_SESSION[&#039;userid&#039;])) { if($_SESSION[&#039;userid&#039;] != null) // Here null is guest { $ses=$_SESSION[&#039;userid&#039;]; //LOOK, now userid will be passed to FreiChat } } if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/mydomain.com/freichat/hardcode.php&quot;)){ require &quot;/mydomain.com/freichat/hardcode.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&lt;script&gt;alert(&#039;module freichatx says: hardcode.php file not found!&#039;);&lt;/script&gt;&quot;; } return 0; } } //FreiChat ENDS HERE ```` And lastly I put the script **index_header.tpl** in the template ```` {literal}&lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://mydomain.com/freichat/client/main.php?id=&lt;?php echo $ses;?&gt;&amp;xhash=&lt;?php echo freichatx_get_hash($ses); ?&gt;&quot;&gt;&lt;/script&gt;{/literal} &lt;link rel=&quot;stylesheet&quot; href=&quot;http://mydomain.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&gt; ``` Please help me fix this? You can also find osdate info at http://www.osdateforum.com/index.php Regards, Phill
edited Aug 21 '16 at 3:29 am

Hi,

The other way I have setup the freichat/hardcode.php also works in the admin side but no users on the members chat side.

$dsn='mysql:************t;dbname=*************'; //DSN
$db_user='*********'; //DB username 
$db_pass='***********'; //DB password 
$driver='Custom'; //Integration driver
$db_prefix='osdate_'; //prefix used for tables in database
$uid='57b799726f8b9'; //Any random unique number

$connected='YES'; //only for custom installation

$PATH = 'freichat/'; // Use this only if you have placed the freichat folder somewhere else
$installed=true; //make it false if you want to reinstall freichat
$admin_pswd='***************'; //backend password 

$debug = false;
$custom_error_handling='YES'; // used during custom installation

$use_cookie='false';

/* email plugin */
$smtp_username = '';
$smtp_password = '';

$force_load_jquery = 'NO';

/* Custom driver */
$usertable='user'; //specifies the name of the table in which your user information is stored. 
$row_username='username'; //specifies the name of the field in which the user's name/display name is stored. 
$row_userid='id'; //specifies the name of the field in which the user's id is stored (usually id or userid)

$avatar_table_name='members'; //specifies the table where avatar information is stored
$avatar_column_name='avatar'; //specifies the column name where the avatar url is stored
$avatar_userid='id'; //specifies the userid  to the user to get the user's avatar
$avatar_reference_user='id'; //specifies the reference to the user to get the user's avatar in user table 
$avatar_reference_avatar='id'; //specifies the reference to the user to get the user's avatar in avatar
$avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not change

Attached is a pic of the admin moderation working.
57b953df45c6a.jpg

Hi, The other way I have setup the freichat/hardcode.php also works in the admin side but no users on the members chat side. ```` $dsn=&#039;mysql:************t;dbname=*************&#039;; //DSN $db_user=&#039;*********&#039;; //DB username $db_pass=&#039;***********&#039;; //DB password $driver=&#039;Custom&#039;; //Integration driver $db_prefix=&#039;osdate_&#039;; //prefix used for tables in database $uid=&#039;57b799726f8b9&#039;; //Any random unique number $connected=&#039;YES&#039;; //only for custom installation $PATH = &#039;freichat/&#039;; // Use this only if you have placed the freichat folder somewhere else $installed=true; //make it false if you want to reinstall freichat $admin_pswd=&#039;***************&#039;; //backend password $debug = false; $custom_error_handling=&#039;YES&#039;; // used during custom installation $use_cookie=&#039;false&#039;; /* email plugin */ $smtp_username = &#039;&#039;; $smtp_password = &#039;&#039;; $force_load_jquery = &#039;NO&#039;; /* Custom driver */ $usertable=&#039;user&#039;; //specifies the name of the table in which your user information is stored. $row_username=&#039;username&#039;; //specifies the name of the field in which the user&#039;s name/display name is stored. $row_userid=&#039;id&#039;; //specifies the name of the field in which the user&#039;s id is stored (usually id or userid) $avatar_table_name=&#039;members&#039;; //specifies the table where avatar information is stored $avatar_column_name=&#039;avatar&#039;; //specifies the column name where the avatar url is stored $avatar_userid=&#039;id&#039;; //specifies the userid to the user to get the user&#039;s avatar $avatar_reference_user=&#039;id&#039;; //specifies the reference to the user to get the user&#039;s avatar in user table $avatar_reference_avatar=&#039;id&#039;; //specifies the reference to the user to get the user&#039;s avatar in avatar $avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not change ```` Attached is a pic of the admin moderation working. ![57b953df45c6a.jpg](serve/attachment&amp;path=57b953df45c6a.jpg)

Hi,

As you can see here in the pic, no members show, the set name is wrong like a guest name.

57b955276698d.jpg

I seem to have the admin right, just need the member side working smile

Hi, As you can see here in the pic, no members show, the set name is wrong like a guest name. ![57b955276698d.jpg](serve/attachment&amp;path=57b955276698d.jpg) I seem to have the admin right, just need the member side working ;)

Your code seems correct.

Can you enable php debug in freichat backend-> server side?

Then check the log file freixlog.log in freichat folder

Your code seems correct. Can you enable php debug in freichat backend-&gt; server side? Then check the log file freixlog.log in freichat folder

Hi,

I turned on the debug in the hardcode.php file and in the admin, will post the log soon.

It's like the frontside (menbers) are not connecting to the database as I noticed also
that the chat rooms made in the admin area also are not showing in the frontside chat Room.

Did I make a error in the index.php code?

Hi, I turned on the debug in the hardcode.php file and in the admin, will post the log soon. It&#039;s like the frontside (menbers) are not connecting to the database as I noticed also that the chat rooms made in the admin area also are not showing in the frontside chat Room. Did I make a error in the index.php code?
edited Aug 23 '16 at 9:17 am

Hi,

Here is a copy of the debug I am getting.

August 23, 2016, 8:07 am: Some error while including chinese language file

August 23, 2016, 8:07 am: main.php  loaded

August 23, 2016, 8:07 am: Inserted the user with the following data :: Username = Guest-1qr3 And ID = 1472430366 Default status  = I am available

August 23, 2016, 8:08 am: Some error while including chinese language file

August 23, 2016, 8:09 am: Some error while including chinese language file

August 23, 2016, 8:09 am: main.php  loaded

August 23, 2016, 8:09 am: Inserted the user with the following data :: Username = Guest-1qr3 And ID = 1472430366 Default status  = I am available

I don't know why it's trying to load chinese, I have it in English ?

Hi, Here is a copy of the debug I am getting. ```` August 23, 2016, 8:07 am: Some error while including chinese language file August 23, 2016, 8:07 am: main.php loaded August 23, 2016, 8:07 am: Inserted the user with the following data :: Username = Guest-1qr3 And ID = 1472430366 Default status = I am available August 23, 2016, 8:08 am: Some error while including chinese language file August 23, 2016, 8:09 am: Some error while including chinese language file August 23, 2016, 8:09 am: main.php loaded August 23, 2016, 8:09 am: Inserted the user with the following data :: Username = Guest-1qr3 And ID = 1472430366 Default status = I am available ```` I don&#039;t know why it&#039;s trying to load chinese, I have it in English ?
edited Aug 23 '16 at 9:16 am

It is inserting guest users in the database.

Probably, the $ses variable is not set correctly.

Try printing that variable and see if you get the current user's userid

It is inserting guest users in the database. Probably, the $ses variable is not set correctly. Try printing that variable and see if you get the current user&#039;s userid

Hi,

Ok did that and it gave no result so I had to change the code a bit.

This is what I had to change, userid to UserId like in osDate code, this then got a print result.

Find this:

if($Username_And_Password_Match)
{
   $_SESSION['userid'] = $users['id']; // Modify to suit your requirements
}

$ses = null; // Return null if user is not logged in 

if(isset($_SESSION['userid']))
{ 
  if($_SESSION['userid'] != null) // Here null is guest 
  { 
   $ses=$_SESSION['userid']; //LOOK, now userid will be passed to FreiChat 
  } 
} 

if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

Change to:

if($Username_And_Password_Match)
{
   $_SESSION['UserId'] = $users['id']; // Modify to suit your requirements
}

if(isset($_SESSION['UserId']))
{ 
  if($_SESSION['UserId'] != null) // Here null is guest 
  { 
   $ses=$_SESSION['UserId']; //LOOK, now userid will be passed to FreiChat 
  } 
} 


if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

Had to remove the $ses = null; // Return null if user is not logged in

With print in it shows the correct user id, but still isn't putting the user into the chat.

I have more that one user logged in so it should be showing one of them.

What is wrong now?

Hi, Ok did that and it gave no result so I had to change the code a bit. This is what I had to change, userid to UserId like in osDate code, this then got a print result. Find this: ```` if($Username_And_Password_Match) { $_SESSION[&#039;userid&#039;] = $users[&#039;id&#039;]; // Modify to suit your requirements } $ses = null; // Return null if user is not logged in if(isset($_SESSION[&#039;userid&#039;])) { if($_SESSION[&#039;userid&#039;] != null) // Here null is guest { $ses=$_SESSION[&#039;userid&#039;]; //LOOK, now userid will be passed to FreiChat } } if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ ```` Change to: ```` if($Username_And_Password_Match) { $_SESSION[&#039;UserId&#039;] = $users[&#039;id&#039;]; // Modify to suit your requirements } if(isset($_SESSION[&#039;UserId&#039;])) { if($_SESSION[&#039;UserId&#039;] != null) // Here null is guest { $ses=$_SESSION[&#039;UserId&#039;]; //LOOK, now userid will be passed to FreiChat } } if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ ```` Had to remove the $ses = null; // Return null if user is not logged in With print in it shows the correct user id, but still isn&#039;t putting the user into the chat. I have more that one user logged in so it should be showing one of them. What is wrong now?
edited Aug 23 '16 at 10:52 pm

Hi,

Can you please help to get this working?

I have also found if I set it to guest, they don't even show in the chat, any ideas?

In firebug, it seems to shows in Responce invalid install uid for some reason.

Hi, Can you please help to get this working? I have also found if I set it to guest, they don&#039;t even show in the chat, any ideas? In firebug, it seems to shows in Responce **invalid install uid** for some reason.
edited Aug 26 '16 at 7:45 am

That error means it couldn't find the freichat configuration file hardcode.php

Did you change the location of freichat folder or have you renamed it?

That error means it couldn&#039;t find the freichat configuration file hardcode.php Did you change the location of freichat folder or have you renamed it?

Hi,

I had changed the location code by mistake but I now corrected that, but the error is still showing in Firebug.

Admin finds all the users, why wont the front end work?
Not even the guests work?

I think it has something to do with this code:

{literal}<script type="text/javascript" language="javascipt" src="http://mydomain.com/freichat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>{/literal}
<link rel="stylesheet" href="http://mydomain.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
Hi, I had changed the location code by mistake but I now corrected that, but the error is still showing in Firebug. Admin finds all the users, why wont the front end work? Not even the guests work? I think it has something to do with this code: ```` {literal}&lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://mydomain.com/freichat/client/main.php?id=&lt;?php echo $ses;?&gt;&amp;xhash=&lt;?php echo freichatx_get_hash($ses); ?&gt;&quot;&gt;&lt;/script&gt;{/literal} &lt;link rel=&quot;stylesheet&quot; href=&quot;http://mydomain.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&gt; ````
edited Aug 30 '16 at 6:56 am

Does it still give that error 'invalid install uid' in the response ?

Does it still give that error &#039;invalid install uid&#039; in the response ?

Hi,

Yes it is still showing that error in the Firebug.

Hi, Yes it is still showing that error in the Firebug.

Hi,

Yes it is still showing that error.

I might have to get you to look at the problem, where do I give you the ftp details?

Hi, Yes it is still showing that error. I might have to get you to look at the problem, where do I give you the ftp details?

Hi adesh,

Yes it does still show that error.

How do I give you the ftp details, so you can have a look?

Hi adesh, Yes it does still show that error. How do I give you the ftp details, so you can have a look?

You can email it to admin[@]codologic.com .
Include a link to this topic

You can email it to admin[@]codologic.com . Include a link to this topic
12
1.05k
31
4
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft