FreiChat related discussions
No one is online

Hi i installed the freichat free version on smf 1.

Im using tinyportal, so i installed the copy&paste code in my index.template.php of my theme.

Bar and chat appear.

The problem is that allways show no one is online.This is my added code in index.template.php

if ($context['user']['is_logged']){
$ses = $context['user']['id'];
}else{
$ses = null;
}

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

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

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

echo' <script type="text/javascript" language="javascipt" src="http://www.clankick.com/freichat/client/main.php?id=',%24ses,'&xhash=',freichatx_get_hash(%24ses),'"></script><link rel="stylesheet" href="http://www.clankick.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">';


In hardcode.php

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


In database details i added the correct values.



I dont see any users online.If im the only user logged, it said no one online, if i logged with same user in another browser a guest appear, if im logged and another user log, another guest user appear.With same user loged in both browser if a say something in chat a chat pop up in the other browser and can speak with me.

Help me fixing that :D

Hi i installed the freichat free version on smf 1. Im using tinyportal, so i installed the copy&amp;paste code in my index.template.php of my theme. Bar and chat appear. The problem is that allways show no one is online.This is my added code in index.template.php &amp;lt;code&amp;gt; if ($context[&#039;user&#039;][&#039;is_logged&#039;]){ $ses = $context[&#039;user&#039;][&#039;id&#039;]; }else{ $ses = null; } if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/clankick/clankick.com/freichat/hardcode.php&quot;)){ require &quot;/home/clankick/clankick.com/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; } } echo&#039; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://www.clankick.com/freichat/client/main.php?id=&#039;,$ses,&#039;&amp;xhash=&#039;,freichatx_get_hash($ses),&#039;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.clankick.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt;&#039;; &amp;lt;/code&amp;gt; In hardcode.php &amp;lt;code&amp;gt; /* Custom driver */ $usertable=&#039;members&#039;; //specifies the name of the table in which your user information is stored. $row_username=&#039;posterName&#039;; //specifies the name of the field in which the user&#039;s name/display name is stored. $row_userid=&#039;ID_MEMBER&#039;; //specifies the name of the field in which the user&#039;s id is stored (usually id or userid) $avatar_field_name = &#039;avatar&#039;; &amp;lt;/code&amp;gt; In database details i added the correct values. I dont see any users online.If im the only user logged, it said no one online, if i logged with same user in another browser a guest appear, if im logged and another user log, another guest user appear.With same user loged in both browser if a say something in chat a chat pop up in the other browser and can speak with me. Help me fixing that :D

echo' <script type="text/javascript" language="javascipt" src="http://www.clankick.com/freichat/client/main.php?id=',%24ses,'&amp;xhash=',freichatx_get_hash(%24ses),'" why are there unnecessary commas for eg. and></script>

echo&#039; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://www.clankick.com/freichat/client/main.php?id=&#039;,$ses,&#039;&amp;xhash=&#039;,freichatx_get_hash($ses),&#039;&quot; Why are there unnecessary commas ? , for eg. &#039;,$ses,&#039; and ,freichatx_get_hash($ses),
Necessity is the mother of all inventions!

if remove commas......


Template Parse Error!

There was a problem loading the /Themes/overview/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in .../Themes/overview/index.template.php on line 99
90: {
91: echo "<script>alert('module freichatx says: hardcode.php file not
92: found!');</script>";
93: }
94:
95: return 0;
96: }
97: }
98:
99: echo' <script type="text/javascript" language="javascipt" src="http://www.clankick.com/freichat/client/main.php?id='%24ses'&xhash='freichatx_get_hash(%24ses)'"></script>
100: <link rel="stylesheet" href="http://www.clankick.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">';
101:
102:
103: echo '<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">



Any way....commas dont see the problem, check the start source of the web...

<script type="text/javascript" language="javascipt" src="http://www.clankick.com/freichat/client/main.php?id=1&xhash=3711d352ef24ec829241c7ea41dff38f"></script><link rel="stylesheet" href="http://www.clankick.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

if remove commas...... &amp;lt;code&amp;gt; Template Parse Error! There was a problem loading the /Themes/overview/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (&#039;) often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly. You may want to try to refresh this page or use the default theme. Parse error: syntax error, unexpected T_VARIABLE, expecting &#039;,&#039; or &#039;;&#039; in .../Themes/overview/index.template.php on line 99 90: { 91: echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: hardcode.php file not 92: found!&#039;);&amp;lt;/script&amp;gt;&quot;; 93: } 94: 95: return 0; 96: } 97: } 98: 99: echo&#039; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://www.clankick.com/freichat/client/main.php?id=&#039;$ses&#039;&amp;xhash=&#039;freichatx_get_hash($ses)&#039;&quot;&amp;gt;&amp;lt;/script&amp;gt; 100: &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.clankick.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt;&#039;; 101: 102: 103: echo &#039;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=&#039;, $context[&#039;character_set&#039;], &#039;&quot; /&amp;gt; &amp;lt;/code&amp;gt; Any way....commas dont see the problem, check the start source of the web... &amp;lt;code&amp;gt; &amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt; &amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&amp;lt;head&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot; src=&quot;http://www.clankick.com/freichat/client/main.php?id=1&amp;xhash=3711d352ef24ec829241c7ea41dff38f&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.clankick.com/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&amp;gt; &amp;lt;/code&amp;gt;
I dont see any users online.If im the only user logged, it said no one online, if i logged with same user in another browser a guest appear, if im logged and another user log, another guest user appear.With same user loged in both browser if a say something in chat a chat pop up in the other browser and can speak with me.


You mean to say , the guest chat is working fine , but freichat is not recognizing the logged in users .

This will happen if the following part of the code has some problem
if ($context['user']['is_logged']){
$ses = $context['user']['id'];
}else{
$ses = null;
}


Try
echo $context['user']['id'];
to see if you actually get the id of the current logged in user.
&amp;lt;blockquote&amp;gt;I dont see any users online.If im the only user logged, it said no one online, if i logged with same user in another browser a guest appear, if im logged and another user log, another guest user appear.With same user loged in both browser if a say something in chat a chat pop up in the other browser and can speak with me.&amp;lt;/blockquote&amp;gt; You mean to say , the guest chat is working fine , but freichat is not recognizing the logged in users . This will happen if the following part of the code has some problem &amp;lt;code&amp;gt; if ($context[&#039;user&#039;][&#039;is_logged&#039;]){ $ses = $context[&#039;user&#039;][&#039;id&#039;]; }else{ $ses = null; }&amp;lt;/code&amp;gt; Try &amp;lt;code&amp;gt;echo $context[&#039;user&#039;][&#039;id&#039;];&amp;lt;/code&amp;gt; to see if you actually get the id of the current logged in user.
Necessity is the mother of all inventions!

is working fine tested

$ses = null;

if ($context['user']['is_logged']){
$ses = $context['user']['id'];
echo $ses;
}else{
echo 'NULL';
}



Anyway new discover freichat dont appear for another users.

Only appear for me, thats so extrange.

is working fine tested &amp;lt;code&amp;gt; $ses = null; if ($context[&#039;user&#039;][&#039;is_logged&#039;]){ $ses = $context[&#039;user&#039;][&#039;id&#039;]; echo $ses; }else{ echo &#039;NULL&#039;; } &amp;lt;/code&amp;gt; Anyway new discover freichat dont appear for another users. Only appear for me, thats so extrange.

Can you send us a test account details via the Contact us form , we would like to have a look at the problem

Can you send us a test account details via the Contact us form , we would like to have a look at the problem
Necessity is the mother of all inventions!

Checked the log and im getting this

April 26, 2013, 2:06 am: Incorrect Query :  SELECT DISTINCT posterName,ID_MEMBER
FROM smf_members
WHERE ID_MEMBER=?
LIMIT 1
session id: 1
PDO error: Array
(
[0] => 00000
)


why "?" when the ses value is correct?

Checked the log and im getting this &amp;lt;code&amp;gt; April 26, 2013, 2:06 am: Incorrect Query : SELECT DISTINCT posterName,ID_MEMBER FROM smf_members WHERE ID_MEMBER=? LIMIT 1 session id: 1 PDO error: Array ( [0] =&amp;gt; 00000 ) &amp;lt;/code&amp;gt; why &quot;?&quot; when the ses value is correct?

FreiChat prepares all its queries for security purposes so the question mark appears , but its actual value is 1 (session id: 1) which is later substituted during actual execution

FreiChat is probably not getting any result so it is showing this error . Please try executing the following query in phpMyAdmin(or any other equivalent)

SELECT DISTINCT posterName,ID_MEMBER
FROM smf_members
WHERE ID_MEMBER=1
LIMIT 1

FreiChat prepares all its queries for security purposes so the question mark appears , but its actual value is 1 (session id: 1) which is later substituted during actual execution FreiChat is probably not getting any result so it is showing this error . Please try executing the following query in phpMyAdmin(or any other equivalent) &amp;lt;code&amp;gt; SELECT DISTINCT posterName,ID_MEMBER FROM smf_members WHERE ID_MEMBER=1 LIMIT 1 &amp;lt;/code&amp;gt;
Necessity is the mother of all inventions!

postername was wrong the correct value now is memberName.Users are stored in session table now.


New log
April 26, 2013, 3:14 am: Wrong method defined!

April 26, 2013, 3:14 am: Wrong method defined!

April 26, 2013, 3:14 am: main.php loaded

April 26, 2013, 3:14 am: Inserted the user with the following data :: Username = Chuzas And ID = 35 Default status = I am available

April 26, 2013, 3:14 am: main.php loaded

April 26, 2013, 3:14 am: Wrong method defined!

April 26, 2013, 3:15 am: main.php loaded

April 26, 2013, 3:22 am: Wrong method defined!

April 26, 2013, 3:22 am: Wrong method defined!

April 26, 2013, 3:22 am: Wrong method defined!

April 26, 2013, 3:22 am: Wrong method defined!

April 26, 2013, 3:22 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:23 am: Wrong method defined!

April 26, 2013, 3:24 am: main.php loaded

April 26, 2013, 3:24 am: Wrong method defined!

April 26, 2013, 3:24 am: Wrong method defined!

April 26, 2013, 3:24 am: Wrong method defined!

April 26, 2013, 3:24 am: main.php loaded

April 26, 2013, 3:24 am: Inserted the user with the following data :: Username = KaZaMa And ID = 1 Default status = I am available

April 26, 2013, 3:24 am: Wrong method defined!

April 26, 2013, 3:25 am: Wrong method defined!



But still no users online on freichat.

postername was wrong the correct value now is memberName.Users are stored in session table now. New log April 26, 2013, 3:14 am: Wrong method defined! April 26, 2013, 3:14 am: Wrong method defined! April 26, 2013, 3:14 am: main.php loaded April 26, 2013, 3:14 am: Inserted the user with the following data :: Username = Chuzas And ID = 35 Default status = I am available April 26, 2013, 3:14 am: main.php loaded April 26, 2013, 3:14 am: Wrong method defined! April 26, 2013, 3:15 am: main.php loaded April 26, 2013, 3:22 am: Wrong method defined! April 26, 2013, 3:22 am: Wrong method defined! April 26, 2013, 3:22 am: Wrong method defined! April 26, 2013, 3:22 am: Wrong method defined! April 26, 2013, 3:22 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:23 am: Wrong method defined! April 26, 2013, 3:24 am: main.php loaded April 26, 2013, 3:24 am: Wrong method defined! April 26, 2013, 3:24 am: Wrong method defined! April 26, 2013, 3:24 am: Wrong method defined! April 26, 2013, 3:24 am: main.php loaded April 26, 2013, 3:24 am: Inserted the user with the following data :: Username = KaZaMa And ID = 1 Default status = I am available April 26, 2013, 3:24 am: Wrong method defined! April 26, 2013, 3:25 am: Wrong method defined! But still no users online on freichat.

I cant state more.

When only one user is loged, display no one online.
When 2 o more users are logged, freichat stucked, getting users logged o trying to conect to database, nothing is filled, chats dont appear etc only the windows.

Checked session table, users are stored, checked in admin zone, users are displayed.

I cant state more. When only one user is loged, display no one online. When 2 o more users are logged, freichat stucked, getting users logged o trying to conect to database, nothing is filled, chats dont appear etc only the windows. Checked session table, users are stored, checked in admin zone, users are displayed.

Can you try this,

Open developer tools (f12 in chrome) click on network tab . click on any one of the requests made by freichat , then click on its response.
Check if you get any errors there.

Can you try this, Open developer tools (f12 in chrome) click on network tab . click on any one of the requests made by freichat , then click on its response. Check if you get any errors there.
Necessity is the mother of all inventions!
197
12
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