Author Topic: Freichat install process  (Read 409 times)

thevisad

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Freichat install process
« on: February 13, 2018, 10:33:34 AM »
I tried following the posing here http://forum.datemill.com/index.php?topic=3439.0 but it was such a hodge podge of people talking about potential working solutions and nothing concrete that actually worked.

First thing first, let's get a copy of the latest version of the script. We really only need to download the free version. https://freichat.com/buy

Extract the file and upload the entire freichat folder to root folder of both your main site and your admin site. You should have the following structure afterwards

http://siteurl/freichat/
http://siteurl/admin/freichat/

Let's start with the admins side to allow the admins to have access to the script and chat with the users and other admins. If you want your admins to chat with your clients, then you will need to modify your admin ID's to exceed the client ID's in the database. In my case the admin id went from 1 to 1999999 which

freichat/admin/hardcode.php

Code: [Select]
/* Custom driver */
$db_prefix='dsb_'; //prefix used for tables in database
$usertable='admin_accounts'; //specifies the name of the table in which your user information is stored.
$row_username='user'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='admin_id';


admin/skin/frame.html
Add the following inside of the <head></head> somewhere insert only one of the following, NOT both, read the details.

to allow the admins to talk with the users
Code: [Select]
<script type="text/javascript" language="javascipt" src="./freichat/client/main.php?id={tplvars.userid}&xhash={tplvars.userid_hash}"></script>
<link rel="stylesheet" href="./freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">   

OR

to allow the admins to talk with only other admins
Code: [Select]
<script type="text/javascript" language="javascipt" src="./admin/freichat/client/main.php?id={tplvars.userid}&xhash={tplvars.userid_hash}"></script>
<link rel="stylesheet" href="./admin/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">   


includes/admin_functions.inc.php

Find the following $tplvars['myself']=$_SESSION[_LICENSE_KEY_]['admin'];

and insert this under

Code: [Select]

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

   if(is_file("../admin/freichat/hardcode.php")){

   require "../admin/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;
}
}


$tplvars['userid']=$_SESSION[_LICENSE_KEY_]['admin']['admin_id'];
$tplvars['userid_hash']=freichatx_get_hash($_SESSION[_LICENSE_KEY_]['admin']['admin_id']);



that completes the admin install process.

christman

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Freichat install process
« Reply #1 on: February 28, 2018, 12:00:00 AM »
I have just installed mine but it's not showing on my site, i don't know why.

Hornyflings

  • Prime Member
  • ****
  • Posts: 196
  • Karma: +3/-0
    • AsiasHeart
Re: Freichat install process
« Reply #2 on: February 28, 2018, 02:07:05 AM »
During freichat install procedure you have to choose "custom" or similar but in no case "etano".
In my experience it's not working when you choose "etano"as prefered driver.