FreiChat related discussions
Freichat setup errors

Hi and thank you in advance...long time freichat fan.

i gave a site (mmorpg game) that i am preparing, and i wanted top integrate this script. i have went through the setup procedures at the end i pasted
<!--===========================FreiChat=======START=========================-->
<!-- For uninstalling ME , first remove/comment all FreiChat related code i.e below code
Then remove FreiChat tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation -->

<?php
$ses=null;

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

   if(is_file("/home/techsup0/public_html/fre/hardcode.php")){

           require "/home/techsup0/public_html/fre/hardcode.php";

           $temp_id =  $ses . $uid;

           return md5($temp_id);

   }
   else
   {
           echo "<script>alert('module freichatx says: hardcode.php file not

found!'smile;</script>";
}

   return 0;

}
}
?>

<script type="text/javascript" language="javascipt" src="http://yyzblog.com/fre/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
<link rel="stylesheet" href="http://yyzblog.com/fre/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<!--===========================FreiChatX=======END=========================-->

in the index.php... but it only shows the chat menu on guest and only at the login screen... know where else on the site .
and the second

if(USER_IS_LOGGED_IN)
{
$ses = LOGGED_IN_USERID; //tell freichat the userid of the current user

setcookie("freichat_user", "LOGGED_IN", time()+3600, "/"); // *do not change -> freichat code

}
else {
$ses = null; //tell freichat that the current user is a guest

setcookie("freichat_user", null, time()+3600, "/"); // *do not change -> freichat code

}

this one i wasnt too clear were to place it........
......
May you please help

http://www.yyzblog.com/dh

Hi and thank you in advance...long time freichat fan. i gave a site (mmorpg game) that i am preparing, and i wanted top integrate this script. i have went through the setup procedures at the end i pasted &lt;!--===========================FreiChat=======START=========================--&gt; &lt;!-- For uninstalling ME , first remove/comment all FreiChat related code i.e below code Then remove FreiChat tables frei_session &amp; frei_chat if necessary The best/recommended way is using the module for installation --&gt; &lt;?php $ses=null; if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/techsup0/public_html/fre/hardcode.php&quot;)){ require &quot;/home/techsup0/public_html/fre/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; } } ?&gt; &lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://yyzblog.com/fre/client/main.php?id=&lt;?php echo $ses;?&gt;&amp;xhash=&lt;?php echo freichatx_get_hash($ses); ?&gt;&quot;&gt;&lt;/script&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;http://yyzblog.com/fre/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&gt; &lt;!--===========================FreiChatX=======END=========================--&gt; in the index.php... but it only shows the chat menu on guest and only at the login screen... know where else on the site . and the second if(USER_IS_LOGGED_IN) { $ses = LOGGED_IN_USERID; //tell freichat the userid of the current user setcookie(&quot;freichat_user&quot;, &quot;LOGGED_IN&quot;, time()+3600, &quot;/&quot;); // *do not change -&gt; freichat code } else { $ses = null; //tell freichat that the current user is a guest setcookie(&quot;freichat_user&quot;, null, time()+3600, &quot;/&quot;); // *do not change -&gt; freichat code } this one i wasnt too clear were to place it........ ...... May you please help http://www.yyzblog.com/dh

Hay thank you again for your help.....I'm away from the office.....will you be able to help me tomorrow around 0900 am Canadian time?

Hay thank you again for your help.....I&#039;m away from the office.....will you be able to help me tomorrow around 0900 am Canadian time?

The entire code looks something like this:

<?php
if(USER_IS_LOGGED_IN)
{ 

$ses = LOGGED_IN_USERID; //tell freichat the userid of the current user

setcookie("freichat_user", "LOGGED_IN", time()+3600, "/"); // *do not change -> freichat code
}
else {
$ses = null; //tell freichat that the current user is a guest

setcookie("freichat_user", null, time()+3600, "/"); // *do not change -> freichat 
}

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

   if(is_file("/home/techsup0/public_html/fre/hardcode.php")){

           require "/home/techsup0/public_html/fre/hardcode.php";

           $temp_id =  $ses . $uid;

           return md5($temp_id);

   }
   else
   {
           echo "<script>alert('module freichatx says: hardcode.php file not
found!'smile;</script>";
}

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

<!--===========================FreiChatX=======END=========================-->

You need to replace USER_IS_LOGGED_IN and LOGGED_IN_USERID with the
appropriate values based on your website.

The entire code looks something like this: ``` &lt;?php if(USER_IS_LOGGED_IN) { $ses = LOGGED_IN_USERID; //tell freichat the userid of the current user setcookie(&quot;freichat_user&quot;, &quot;LOGGED_IN&quot;, time()+3600, &quot;/&quot;); // *do not change -&gt; freichat code } else { $ses = null; //tell freichat that the current user is a guest setcookie(&quot;freichat_user&quot;, null, time()+3600, &quot;/&quot;); // *do not change -&gt; freichat } if(!function_exists(&quot;freichatx_get_hash&quot;smile){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/techsup0/public_html/fre/hardcode.php&quot;)){ require &quot;/home/techsup0/public_html/fre/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;smile;&lt;/script&gt;&quot;; } return 0; } } ?&gt; ``` ``` &lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://yyzblog.com/fre/client/main.php?id=&lt;?php echo $ses;?&gt;&amp;xhash=&lt;?php echo freichatx_get_hash($ses); ?&gt;&quot;&gt;&lt;/script&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;http://yyzblog.com/fre/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&gt; &lt;!--===========================FreiChatX=======END=========================--&gt; ``` You need to replace USER_IS_LOGGED_IN and LOGGED_IN_USERID with the appropriate values based on your website.

not exactly sure .....i know its uni1_users and i have done all that in the hardcore.......but not sure about this

not exactly sure .....i know its uni1_users and i have done all that in the hardcore.......but not sure about this

Hi,

Sorry for the late reply.

Where exactly are you stuck ?

Do you want us to explain what the below means:

You need to replace USER_IS_LOGGED_IN and LOGGED_IN_USERID with the

Let us know more details on what actually you tried so that we can help you better.

Hi, Sorry for the late reply. Where exactly are you stuck ? Do you want us to explain what the below means: &gt;You need to replace USER_IS_LOGGED_IN and LOGGED_IN_USERID with the Let us know more details on what actually you tried so that we can help you better.
Necessity is the mother of all inventions!
461
7
3
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