FreiChat related discussions
memht freichat install

i want to install the freichat in the memht portal but i cannot stablish the database conection in custom install...
I says...

:( Could not authenticate user . Please verify your edited copy-paste code and make any required changes

my login code is :

function login() {
global $dblink,$siteConfig,$visitorInfo,$userid,$page;

if (isUser($userid)) {
$row_info = $dblink->get_row("SELECT *,DATE_FORMAT(regdate, '".$siteConfig['timestamp']."') as regdate FROM memht_utenti WHERE id=$userid");
$user = outCode($row_info['user']);
$pass = $row_info['pass'];
$email = outCode($row_info['email']);
$regdate = $row_info['regdate'];
$sito = outCode($row_info['sito']);
$icq = outCode($row_info['icq']);
$msn = outCode($row_info['msn']);
$aol = outCode($row_info['aol']);
$yahoo = outCode($row_info['yahoo']);
$avatar = outCode($row_info['avatar']);
$post = intval($row_info['post']);
$gender = intval($row_info['gender']);
$title_enabled = intval($row_info['title_enabled']);
$title_text = outCode($row_info['title_text']);
$signature = censure(bb2html(outCode($row_info['signature'],0)));
$feedurl = outCode($row_info['feed']);
$contributes = intval($row_info['contributes']);


Any help???

i want to install the freichat in the memht portal but i cannot stablish the database conection in custom install... I says... :( Could not authenticate user . Please verify your edited copy-paste code and make any required changes my login code is : function login() { global $dblink,$siteConfig,$visitorInfo,$userid,$page; if (isUser($userid)) { $row_info = $dblink->get_row("SELECT *,DATE_FORMAT(regdate, '".$siteConfig['timestamp']."') as regdate FROM memht_utenti WHERE id=$userid"); $user = outCode($row_info['user']); $pass = $row_info['pass']; $email = outCode($row_info['email']); $regdate = $row_info['regdate']; $sito = outCode($row_info['sito']); $icq = outCode($row_info['icq']); $msn = outCode($row_info['msn']); $aol = outCode($row_info['aol']); $yahoo = outCode($row_info['yahoo']); $avatar = outCode($row_info['avatar']); $post = intval($row_info['post']); $gender = intval($row_info['gender']); $title_enabled = intval($row_info['title_enabled']); $title_text = outCode($row_info['title_text']); $signature = censure(bb2html(outCode($row_info['signature'],0))); $feedurl = outCode($row_info['feed']); $contributes = intval($row_info['contributes']); Any help???

My login code is :

function login() {
global $dblink,$siteConfig,$visitorInfo,$userid,$page;

if (isUser($userid)) {
$row_info = $dblink->get_row("SELECT *,DATE_FORMAT(regdate, '".$siteConfig['timestamp']."') as regdate FROM memht_utenti WHERE id=$userid");
$user = outCode($row_info['user']);
$pass = $row_info['pass'];
$email = outCode($row_info['email']);
$regdate = $row_info['regdate'];
$sito = outCode($row_info['sito']);
$icq = outCode($row_info['icq']);
$msn = outCode($row_info['msn']);
$aol = outCode($row_info['aol']);
$yahoo = outCode($row_info['yahoo']);
$avatar = outCode($row_info['avatar']);
$post = intval($row_info['post']);
$gender = intval($row_info['gender']);
$title_enabled = intval($row_info['title_enabled']);
$title_text = outCode($row_info['title_text']);
$signature = censure(bb2html(outCode($row_info['signature'],0)));
$feedurl = outCode($row_info['feed']);
$contributes = intval($row_info['contributes']);


ANY HELP???

My login code is : function login() { global $dblink,$siteConfig,$visitorInfo,$userid,$page; if (isUser($userid)) { $row_info = $dblink->get_row("SELECT *,DATE_FORMAT(regdate, '".$siteConfig['timestamp']."') as regdate FROM memht_utenti WHERE id=$userid"); $user = outCode($row_info['user']); $pass = $row_info['pass']; $email = outCode($row_info['email']); $regdate = $row_info['regdate']; $sito = outCode($row_info['sito']); $icq = outCode($row_info['icq']); $msn = outCode($row_info['msn']); $aol = outCode($row_info['aol']); $yahoo = outCode($row_info['yahoo']); $avatar = outCode($row_info['avatar']); $post = intval($row_info['post']); $gender = intval($row_info['gender']); $title_enabled = intval($row_info['title_enabled']); $title_text = outCode($row_info['title_text']); $signature = censure(bb2html(outCode($row_info['signature'],0))); $feedurl = outCode($row_info['feed']); $contributes = intval($row_info['contributes']); ANY HELP???


  • Download the latest version FreiChat from http://codologic.com/page/codo_commerce/buy

  • uncompress the zip file it in the root directory.

  • then go to, http://yourdomain.com/freichat click on install -> click
    accept.

  • Then select integration type as : customized Then follow the steps correctly
    until you reach the page as shown below,





Enter the details as shown above

(don't forget to make any necessary changes and it is better to leave
the prefix empty even if you have one)


Then click on submit(you should see a message showing successful connection)

Then click on 'create tables' to create the necessary tables.

you should see something as shown below






click next, you will a page with the code to be copy pasted, copy and
paste it in templates/memht/head.php






Paste the above code in templates/memht/head.php as shown below






Then proceed, and you should see an option for 'User Authentication'

You will find some generic code specified, but for memht, the code is
as follows,


copy paste the above in templates/memht/head.php after $ses=null;






Then proceed to 'Database table linking' and fill the details as shown
below.

Note: memhtt_user, here memht_ is the prefix, your table might have
a different prefix or no prefix at all.




You may stop the installation after it shows "Basic installation is now
completed"

Avatars are not yet available, you may have to edit the custom driver
located in freichat/server/drivers/custom.php to derive the image for your
users.
<div> <ul> <li>Download the latest version FreiChat from http://codologic.com/page/codo_commerce/buy</li> <li>uncompress the zip file it in the root directory.</li> <li>then go to, http://yourdomain.com/freichat click on install -> click accept.</li> <li>Then select integration type as : customized Then follow the steps correctly until you reach the page as shown below,</li> </ul> <img src="http://i.imgur.com/ZdhGLva.png"> <br> <br> <br> Enter the details as shown above <br> (don't forget to make any necessary changes and it is better to leave the prefix empty even if you have one) <br> <br> Then click on submit(you should see a message showing successful connection) <br> Then click on 'create tables' to create the necessary tables. <br> you should see something as shown below <br> <br> <br> <img src="http://i.imgur.com/LiKqatr.png"> <br> <br> <br> click next, you will a page with the code to be copy pasted, copy and paste it in templates/memht/head.php <br> <br> <br> <img src="http://i.imgur.com/YvllIr5.png"> <br><br/><br/> Paste the above code in templates/memht/head.php as shown below <br><br/><br/> <img src="http://i.imgur.com/yeTAi4e.png"> <br><br/><br/> Then proceed, and you should see an option for 'User Authentication' <br> You will find some generic code specified, but for memht, the code is as follows, <br> <br> copy paste the above in templates/memht/head.php after $ses=null; <br><br/><br/> <img src="http://i.imgur.com/JEbClgw.png"> <br> <br/><br/>Then proceed to 'Database table linking' and fill the details as shown below. <br/>Note: memhtt_user, here memht_ is the prefix, your table might have a different prefix or no prefix at all.<br/><br/><br/> <img src="http://i.imgur.com/MW4elQO.png"> <br> <br> You may stop the installation after it shows "Basic installation is now completed" <br> Avatars are not yet available, you may have to edit the custom driver located in freichat/server/drivers/custom.php to derive the image for your users.</div>
Necessity is the mother of all inventions!

thanks for the reply... but i use the memht 4.0.1 version... do you know how install in this version???

thanks for the reply... but i use the memht 4.0.1 version... do you know how install in this version???

No, the download is not available in their website, I don't think it is supported anymore by the memht authors.
I haven't seen the 4.x code, but the procedure must be almost the same.

No, the download is not available in their website, I don't think it is supported anymore by the memht authors. I haven't seen the 4.x code, but the procedure must be almost the same.
Necessity is the mother of all inventions!

the code to be copy pasted must be in a PHP file. it has to appear between <head> and </head>

the code to be copy pasted must be in a PHP file. it has to appear between &amp;lt;head&amp;gt; and &amp;lt;/head&amp;gt;
Necessity is the mother of all inventions!

i've done what you said but it's not working. it work with $ses=$id but seems is not connecting with the DB because don't appear the user names... any sugestion???

i&#039;ve done what you said but it&#039;s not working. it work with $ses=$id but seems is not connecting with the DB because don&#039;t appear the user names... any sugestion???

i made the connection sucessfully but now don't appear the user names... i think i am doing something wrong...
here is my code...


<!--===========================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=$id;
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/");

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

if(is_file("/home/portalen/public_html/freichat/hardcode.php")){

require "/home/portalen/public_html/freichat/hardcode.php";

$temp_id = $ses . $uid;

return md5($temp_id);

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

return 0;
}
}
?>
<script type="text/javascript" language="javascipt" src="http://www.saudenfermagem.com/freichat/client/main.php?id=&lt;?php%20echo%20%24ses;?&gt;&amp;xhash=&lt;?php%20echo%20freichatx_get_hash(%24ses);%20?&gt;"></script><link rel="stylesheet" href="http://www.saudenfermagem.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<!--===========================FreiChatX=======END=========================-->
i made the connection sucessfully but now don&#039;t appear the user names... i think i am doing something wrong... here is my code... &amp;lt;head&amp;gt; &amp;lt;!--===========================FreiChat=======START=========================--&amp;gt; &amp;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 --&amp;gt; &amp;lt;?php $ses=$id; setcookie(&quot;freichat_user&quot;, &quot;LOGGED_IN&quot;, time()+3600, &quot;/&quot;); if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/portalen/public_html/freichat/hardcode.php&quot;)){ require &quot;/home/portalen/public_html/freichat/hardcode.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: hardcode.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot;src=&quot;http://www.saudenfermagem.com/freichat/client/main.php?id=&amp;lt;?php echo $ses;?&amp;gt;&amp;xhash=&amp;lt;?php echo freichatx_get_hash($ses); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.saudenfermagem.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt; &amp;lt;!--===========================FreiChatX=======END=========================--&amp;gt; &amp;lt;/head&amp;gt;

i made some chages in the code that you sent me ...

<!--===========================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 $freiuser = "null";

if($id=0){

$ses=$id;
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/");
}
else{

$ses=null;
setcookie("freichat_user", null, time()+3600, "/");
}


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

if(is_file("/home/portalen/public_html/freichat/hardcode.php")){

require "/home/portalen/public_html/freichat/hardcode.php";

$temp_id = $ses . $uid;

return md5($temp_id);

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

return 0;
}
}
?>
<script type="text/javascript" language="javascipt" src="http://www.saudenfermagem.com/freichat/client/main.php?id=&lt;?php%20echo%20%24ses;?&gt;&amp;xhash=&lt;?php%20echo%20freichatx_get_hash(%24ses);%20?&gt;"></script><link rel="stylesheet" href="http://www.saudenfermagem.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css"><!--===========================FreiChatX=======END=========================-->

The chat is working but everybody is guest and i don't see registered users.

the log return me this...

une 15, 2013, 8:10 pm: main.php loaded

June 15, 2013, 8:10 pm: Wrong method defined!

June 15, 2013, 8:11 pm: Wrong method defined!

can you help me???

i made some chages in the code that you sent me ... &amp;lt;!--===========================FreiChat=======START=========================--&amp;gt; &amp;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 --&amp;gt; &amp;lt;?php $freiuser = &quot;null&quot;; if($id=0){ $ses=$id; setcookie(&quot;freichat_user&quot;, &quot;LOGGED_IN&quot;, time()+3600, &quot;/&quot;); } else{ $ses=null; setcookie(&quot;freichat_user&quot;, null, time()+3600, &quot;/&quot;); } if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/portalen/public_html/freichat/hardcode.php&quot;)){ require &quot;/home/portalen/public_html/freichat/hardcode.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: hardcode.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot;src=&quot;http://www.saudenfermagem.com/freichat/client/main.php?id=&amp;lt;?php echo $ses;?&amp;gt;&amp;xhash=&amp;lt;?php echo freichatx_get_hash($ses); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.saudenfermagem.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt; &amp;lt;!--===========================FreiChatX=======END=========================--&amp;gt; The chat is working but everybody is guest and i don&#039;t see registered users. the log return me this... une 15, 2013, 8:10 pm: main.php loaded June 15, 2013, 8:10 pm: Wrong method defined! June 15, 2013, 8:11 pm: Wrong method defined! can you help me???

change the code again...


<!--===========================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 $freiuser = "null";

if(!$ses=$User->id=0){

$ses=$User->id;
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/");
}
else{

$ses=null;
setcookie("freichat_user", null, time()+3600, "/");
}


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

if(is_file("/home/portalen/public_html/freichat/hardcode.php")){

require "/home/portalen/public_html/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;
}
}
?>
<script type="text/javascript" language="javascipt" src="http://www.saudenfermagem.com/freichat/client/main.php?id=&lt;?php%20echo%20%24ses;?&gt;&amp;xhash=&lt;?php%20echo%20freichatx_get_hash(%24ses);%20?&gt;"></script><link rel="stylesheet" href="http://www.saudenfermagem.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<!--===========================FreiChatX=======END=========================-->

Log information:

June 15, 2013, 9:02 pm: main.php loaded

June 15, 2013, 9:02 pm: Incorrect Query : SELECT DISTINCT user,id
FROM memht_utenti
WHERE id=?
LIMIT 1
session id: 0
PDO error: Array
(
[0] => 00000
[1] =>
[2] =>

Something is missing to me... please help!!!
change the code again... &amp;lt;head&amp;gt; &amp;lt;!--===========================FreiChat=======START=========================--&amp;gt; &amp;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 --&amp;gt; &amp;lt;?php $freiuser = &quot;null&quot;; if(!$ses=$User-&amp;gt;id=0){ $ses=$User-&amp;gt;id; setcookie(&quot;freichat_user&quot;, &quot;LOGGED_IN&quot;, time()+3600, &quot;/&quot;); } else{ $ses=null; setcookie(&quot;freichat_user&quot;, null, time()+3600, &quot;/&quot;); } if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/portalen/public_html/freichat/hardcode.php&quot;)){ require &quot;/home/portalen/public_html/freichat/hardcode.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: hardcode.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot;src=&quot;http://www.saudenfermagem.com/freichat/client/main.php?id=&amp;lt;?php echo $ses;?&amp;gt;&amp;xhash=&amp;lt;?php echo freichatx_get_hash($ses); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.saudenfermagem.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt; &amp;lt;!--===========================FreiChatX=======END=========================--&amp;gt; &amp;lt;/head&amp;gt; Log information: June 15, 2013, 9:02 pm: main.php loaded June 15, 2013, 9:02 pm: Incorrect Query : SELECT DISTINCT user,id FROM memht_utenti WHERE id=? LIMIT 1 session id: 0 PDO error: Array ( [0] =&amp;gt; 00000 [1] =&amp;gt; [2] =&amp;gt; Something is missing to me... please help!!!

The below line is wrong

if(!$ses=$User->id=0){


It should be this way



if($User->id){

$ses=$User->id;
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/");
}
else{

$ses=null;
setcookie("freichat_user", null, time()+3600, "/");
}
The below line is wrong if(!$ses=$User-&amp;gt;id=0){ It should be this way &amp;lt;pre class=&quot;brush:php&quot;&amp;gt; if($User-&amp;gt;id){ $ses=$User-&amp;gt;id; setcookie(&quot;freichat_user&quot;, &quot;LOGGED_IN&quot;, time()+3600, &quot;/&quot;); } else{ $ses=null; setcookie(&quot;freichat_user&quot;, null, time()+3600, &quot;/&quot;); } &amp;lt;/pre&amp;gt;
Necessity is the mother of all inventions!

it return 2 errors

Function: include
Note: Undefined variable: User

and

Function: include
Note: Trying to get property of non-object

it return 2 errors Function: include Note: Undefined variable: User and Function: include Note: Trying to get property of non-object

we don't know how memht 4 works, the $User variable is present in memht 5. but I think it is not present in memht 4.
instead of that, what you can do is pass the ID of the user, using session or any other global variable that holds the ID.

you will get more help if you ask this in memht forum. as they will have a good idea where the id is stored.



we don&#039;t know how memht 4 works, the $User variable is present in memht 5. but I think it is not present in memht 4. instead of that, what you can do is pass the ID of the user, using session or any other global variable that holds the ID. you will get more help if you ask this in memht forum. as they will have a good idea where the id is stored.
Necessity is the mother of all inventions!
176
13
0
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