FreiChat related discussions
multilanguage chat?

hi, i noticed i can set the freichat language, but i have a multilanguage site, i want to adapt the chat to joomla user language.
I guess it's about a little hack..could you help me?

hi, i noticed i can set the freichat language, but i have a multilanguage site, i want to adapt the chat to joomla user language. I guess it's about a little hack..could you help me?

i want to adapt the chat to joomla user language.

What do you mean by this ?
Do you want to add all freichat translations to Joomla ini files ?

Let us know your purpose for doing this , there may be a better way than some hacks .

>i want to adapt the chat to joomla user language. What do you mean by this ? Do you want to add all freichat translations to Joomla ini files ? Let us know your purpose for doing this , there may be a better way than some hacks .
Necessity is the mother of all inventions!

i mean: if the user set joomla frontend in english, freichat should be english, if italian, freichat should be italian.

i mean: if the user set joomla frontend in english, freichat should be english, if italian, freichat should be italian.

Yes, that is possible .

We can detect the current language in Joomla using

$lang = JFactory::getLanguage();
echo 'Current language is: ' . $lang->getName();

The problem is , FreiChat does not load the Joomla framework, so you cannot use this code directly .

So, before proceeding to the code, can you tell us how you installed freichat i.e did you install the joomla module or copy pasted the code in your template ?

Yes, that is possible . We can detect the current language in Joomla using ``` $lang = JFactory::getLanguage(); echo 'Current language is: ' . $lang->getName(); ``` The problem is , FreiChat does not load the Joomla framework, so you cannot use this code directly . So, before proceeding to the code, can you tell us how you installed freichat i.e did you install the joomla module **or** copy pasted the code in your template ?
Necessity is the mother of all inventions!

Open joomla/modules/mod_freichatx/mod_freichatx.php

Around line 33 , replace

$document->addScript($host.'freichat/client/main.php?id='.$ses.'&xhash='.freichatx_get_hash($ses));

with

$lang = JFactory::getLanguage();
$language = $lang->getTag();
$document->addScript($host.'freichat/client/main.php?lang='.$language.'&id='.$ses.'&xhash='.freichatx_get_hash($ses));

Now, open freichat/arg.php , around line 120 , replace

$this->lang = $parameters['lang']; //Language please do not include .php here only file name

with

$this->lang = $_GET['lang']; //Language please do not include .php here only file name

But, the problem is that Joomla uses language file names as 'en-GB' but freichat uses names like 'english'.

So you need to rename all file names in freichat/lang directory .

For example , rename

freichat/lang/english.php

to

freichat/lang/en-GB.php
Open joomla/modules/mod_freichatx/mod_freichatx.php Around line 33 , replace ``` $document->addScript($host.'freichat/client/main.php?id='.$ses.'&xhash='.freichatx_get_hash($ses)); ``` with ``` $lang = JFactory::getLanguage(); $language = $lang->getTag(); $document->addScript($host.'freichat/client/main.php?lang='.$language.'&id='.$ses.'&xhash='.freichatx_get_hash($ses)); ``` Now, open freichat/arg.php , around line 120 , replace ``` $this->lang = $parameters['lang']; //Language please do not include .php here only file name ``` with ``` $this->lang = $_GET['lang']; //Language please do not include .php here only file name ``` But, the problem is that Joomla uses language file names as 'en-GB' but freichat uses names like 'english'. So you need to rename all file names in freichat/lang directory . For example , rename ``` freichat/lang/english.php ``` to ``` freichat/lang/en-GB.php ```
Necessity is the mother of all inventions!

very thanks! but i get an error in js console

Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://MYSITE.it/freichat/client/jquery/freichat_themes/freichatcss.php
very thanks! but i get an error in js console ```` Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://MYSITE.it/freichat/client/jquery/freichat_themes/freichatcss.php ````

That error looks unrelated to the previous changes .

Can you post the entire code[modified] in mod_freichatx.php ?

That error looks unrelated to the previous changes . Can you post the entire code[modified] in mod_freichatx.php ?
Necessity is the mother of all inventions!

thanks for your help.
this is the module code

<?php
defined('_JEXEC') or die ('Direct Access is not allowed');

$host = JURI::root();


$document = JFactory::getDocument();

$session = JSession::getInstance("none",array());
$ses=$session->getId();

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

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

               require(JPATH_SITE.'/freichat/hardcode.php');

               $temp_id =  $ses . $uid;

               return md5($temp_id);

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

       return 0;
}
}

//$document->addScript($host.'freichat/client/main.php?id='.$ses.'&xhash='.freichatx_get_hash($ses));

$lang = JFactory::getLanguage();
$language = $lang->getTag();
$document->addScript($host.'freichat/client/main.php?lang='.$language.'&id='.$ses.'&xhash='.freichatx_get_hash($ses));

$document->addStyleSheet($host.'freichat/client/jquery/freichat_themes/freichatcss.php');
?>
thanks for your help. this is the module code ```` &amp;lt;?php defined(&#039;_JEXEC&#039;) or die (&#039;Direct Access is not allowed&#039;); $host = JURI::root(); $document = JFactory::getDocument(); $session = JSession::getInstance(&quot;none&quot;,array()); $ses=$session-&amp;gt;getId(); if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(JPATH_SITE.&quot;/freichat/hardcode.php&quot;)){ require(JPATH_SITE.&#039;/freichat/hardcode.php&#039;); $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: arg.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } //$document-&amp;gt;addScript($host.&#039;freichat/client/main.php?id=&#039;.$ses.&#039;&amp;xhash=&#039;.freichatx_get_hash($ses)); $lang = JFactory::getLanguage(); $language = $lang-&amp;gt;getTag(); $document-&amp;gt;addScript($host.&#039;freichat/client/main.php?lang=&#039;.$language.&#039;&amp;id=&#039;.$ses.&#039;&amp;xhash=&#039;.freichatx_get_hash($ses)); $document-&amp;gt;addStyleSheet($host.&#039;freichat/client/jquery/freichat_themes/freichatcss.php&#039;); ?&amp;gt; ````

those are the last rows of the error log. basically your code doesn't works so well to me smile
see that require(lang/.php)

[Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Notice:  Undefined index: lang in /usr/local/pem/JOOMLA/freichat/arg.php on line 122, referer: http://MYJOOMLA.it/it/chi-siamo.html
[Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Warning:  require(lang/.php): failed to open stream: No such file or directory in /usr/local/pem/JOOMLA/freichat/arg.php on line 320, referer: http://MYJOOMLA.it/it/chi-siamo.html
[Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Warning:  require(lang/.php): failed to open stream: No such file or directory in /usr/local/pem/JOOMLA/freichat/arg.php on line 320, referer: http://MYJOOMLA.it/it/chi-siamo.html
[Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Fatal error:  require(): Failed opening required 'lang/.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/local/pem/JOOMLA/freichat/arg.php on line 320, referer: http://MYJOOMLA.it/it/chi-siamo.html
those are the last rows of the error log. basically your code doesn&#039;t works so well to me :) see that **require(lang/.php)** ```` [Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Notice: Undefined index: lang in /usr/local/pem/JOOMLA/freichat/arg.php on line 122, referer: http://MYJOOMLA.it/it/chi-siamo.html [Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Warning: require(lang/.php): failed to open stream: No such file or directory in /usr/local/pem/JOOMLA/freichat/arg.php on line 320, referer: http://MYJOOMLA.it/it/chi-siamo.html [Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Warning: require(lang/.php): failed to open stream: No such file or directory in /usr/local/pem/JOOMLA/freichat/arg.php on line 320, referer: http://MYJOOMLA.it/it/chi-siamo.html [Wed Jul 30 19:41:30 2014] [error] [client 82.61.92.129] PHP Fatal error: require(): Failed opening required &#039;lang/.php&#039; (include_path=&#039;.:/usr/share/pear:/usr/share/php&#039;) in /usr/local/pem/JOOMLA/freichat/arg.php on line 320, referer: http://MYJOOMLA.it/it/chi-siamo.html ````

Can you make the following changes:

Open freichat/client/main.php

Replace , around line 3,

session_start();

with

session_start();  

$_SESSION['frei_lang'] = $_GET['lang'];

Now, open freichat/arg.php , around line 120 , replace

$this->lang = $_GET['lang']; //Language please do not include .php here only file name

with

$this->lang = $_SESSION['frei_lang']; //Language please do not include .php here only file name
Can you make the following changes: Open freichat/client/main.php Replace , around line 3, ``` session_start(); ``` with ``` session_start(); $_SESSION[&#039;frei_lang&#039;] = $_GET[&#039;lang&#039;]; ``` Now, open freichat/arg.php , around line 120 , replace ``` $this-&amp;gt;lang = $_GET[&#039;lang&#039;]; //Language please do not include .php here only file name ``` with ``` $this-&amp;gt;lang = $_SESSION[&#039;frei_lang&#039;]; //Language please do not include .php here only file name ```
Necessity is the mother of all inventions!

uhm still errors..

[Fri Aug 01 14:18:16 2014] [error] [client 82.55.46.198] File does not exist: /usr/local/pem/vhosts/../httpdocs/MYSITE.it/components/com_community/assets/_release/js/backbone-min.map, referer: http://MYSITE.it/it/front.html
[Fri Aug 01 14:18:17 2014] [error] [client 82.55.46.198] PHP Fatal error:  Call to a member function fetchAll() on a non-object in /usr/local/pem/vhosts/../httpdocs/MYSITE.it/freichat/server/drivers/JSocial.php on line 48, referer: http://MYSITE.it/it/front.html

i can provide you the ftp credentials if you want to check..

uhm still errors.. ```` [Fri Aug 01 14:18:16 2014] [error] [client 82.55.46.198] File does not exist: /usr/local/pem/vhosts/../httpdocs/MYSITE.it/components/com_community/assets/_release/js/backbone-min.map, referer: http://MYSITE.it/it/front.html [Fri Aug 01 14:18:17 2014] [error] [client 82.55.46.198] PHP Fatal error: Call to a member function fetchAll() on a non-object in /usr/local/pem/vhosts/../httpdocs/MYSITE.it/freichat/server/drivers/JSocial.php on line 48, referer: http://MYSITE.it/it/front.html ```` i can provide you the ftp credentials if you want to check..

ok i see the freichat window and the multilanguage hack works, but it is stuck on "Getting list of online users"..so it doesn't works fine..

(i see some error in js console, and in php error log)
JS console:

GET http://MYSITE.it/freichat/server/freichat.php?freimode=getmembers&xhash…Sono+Disponibile&long_poll=false&in_room=-1&custom_gst_name=Amministratore 500 (Internal Server Error)

php error log

[Fri Aug 01 14:27:00 2014] [error] [client 82.55.46.198] PHP Fatal error:  Call to a member function fetchAll() on a non-object in /usr/local/pem/vhosts/[..]/httpdocs/MYSITE.it/freichat/server/drivers/JSocial.php on line 48, referer: http://MYSITE.it/en/
ok i see the freichat window and the multilanguage hack works, but it is stuck on &quot;Getting list of online users&quot;..so it doesn&#039;t works fine.. (i see some error in js console, and in php error log) JS console: ```` GET http://MYSITE.it/freichat/server/freichat.php?freimode=getmembers&amp;xhash…Sono+Disponibile&amp;long_poll=false&amp;in_room=-1&amp;custom_gst_name=Amministratore 500 (Internal Server Error) ```` php error log ```` [Fri Aug 01 14:27:00 2014] [error] [client 82.55.46.198] PHP Fatal error: Call to a member function fetchAll() on a non-object in /usr/local/pem/vhosts/[..]/httpdocs/MYSITE.it/freichat/server/drivers/JSocial.php on line 48, referer: http://MYSITE.it/en/ ````

There is some error in the query .

Can you try this :

Open freichat/server/drivers/JSocial.php

Around line 44, replace

//echo $query;

with

echo $query;

Now, load your website using chrome , open developer tools (f12) , click on network tab , click on any of the requests made by freichat , click on response tab for that request .

You should see a query in the response, paste the query here .

There is some error in the query . Can you try this : Open freichat/server/drivers/JSocial.php Around line 44, replace ``` //echo $query; ``` with ``` echo $query; ``` Now, load your website using chrome , open developer tools (f12) , click on network tab , click on any of the requests made by freichat , click on response tab for that request . You should see a query in the response, paste the query here .
Necessity is the mother of all inventions!

i see two requests:

  • freichat/server/freichat.php?freimode=getmembers.....

    SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, c.value AS country
                                 FROM frei_session AS f
                                 LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid
                                 LEFT JOIN  community_fields_value AS c ON c.user_id=f.session_id  
                                WHERE time>1407003466
                                 AND f.session_id!=827
                                 AND f.status!=2
                                 AND f.status!=0
                                 AND c.field_id=11
    
  • freichat/server/freichat.php?freimode=getdata....

{"exist":false,"messages":[]}

please note the LEFT JOIN community_fields_value AS c ON c.user_id=f.session_id
maybe the problem is there.
i changed the 'alias': LEFT JOIN community_fields_value AS v
i noticed there already is an alias 'c' in getbuddies()
(i'm trying to add an extra field)

anyway i noticed sometimes for see the freichat window i have to reload the page after the login, the first time doesn't show anything..

i see two requests: - freichat/server/freichat.php?freimode=getmembers..... ```` SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, c.value AS country FROM frei_session AS f LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid LEFT JOIN community_fields_value AS c ON c.user_id=f.session_id WHERE time&amp;gt;1407003466 AND f.session_id!=827 AND f.status!=2 AND f.status!=0 AND c.field_id=11 ```` - freichat/server/freichat.php?freimode=getdata.... ```` {&quot;exist&quot;:false,&quot;messages&quot;:[]} ```` please note the **LEFT JOIN community_fields_value AS c ON c.user_id=f.session_id** maybe the problem is there. i changed the &#039;alias&#039;: LEFT JOIN community_fields_value AS **v** i noticed there already is an alias &#039;c&#039; in getbuddies() ([i&#039;m trying to add an extra field](http://codologic.com/forum/index.php?u=/forum/topic/1177/jomsocial-extrafield-below-the-username-in-chat-user-list)) anyway i noticed sometimes for see the freichat window i have to reload the page after the login, the first time doesn&#039;t show anything..

Can you run the following query using phpmyadmin(or equivalent) in your database :

SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, c.value AS country
                             FROM frei_session AS f
                             LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid
                             LEFT JOIN  community_fields_value AS c ON c.user_id=f.session_id  
                            WHERE time>1407003466
                             AND f.session_id!=827
                             AND f.status!=2
                             AND f.status!=0
                             AND c.field_id=11

Post any errors that you may get .

Looking at the query , your LEFT JOIN looks wrong, it should be

LEFT JOIN  z27s5_community_fields_value AS c ON c.user_id=f.session_id

instead of

LEFT JOIN  community_fields_value AS c ON c.user_id=f.session_id
Can you run the following query using phpmyadmin(or equivalent) in your database : ``` SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, c.value AS country FROM frei_session AS f LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid LEFT JOIN community_fields_value AS c ON c.user_id=f.session_id WHERE time&amp;gt;1407003466 AND f.session_id!=827 AND f.status!=2 AND f.status!=0 AND c.field_id=11 ``` Post any errors that you may get . Looking at the query , your LEFT JOIN looks wrong, it should be ``` LEFT JOIN z27s5_community_fields_value AS c ON c.user_id=f.session_id ``` instead of ``` LEFT JOIN community_fields_value AS c ON c.user_id=f.session_id ```
Necessity is the mother of all inventions!

that's not the only silly mistake..
the table's name is community_fields_valueS!
BUT i fixed those 2 errors and i still dont get the user list smile

EDIT: wait a min:
now thats the response of the freichat request ... what the hack

SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, v.value AS country
                               FROM frei_session AS f
                               LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid
                               LEFT JOIN  z27s5_community_fields_values AS v ON v.user_id=f.session_id  
                              WHERE time>1407006515
                               AND f.session_id!=827
                               AND f.status!=2
                               AND f.status!=0
                               AND v.field_id=11SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, v.value AS country
                               FROM frei_session AS f
                               LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid
                               LEFT JOIN  z27s5_community_fields_values AS v ON v.user_id=f.session_id  
                              WHERE time>1407006515
                               AND f.session_id!=827
                               AND f.status!=2
                               AND f.status!=0
                               AND v.field_id=11{"userdata":[],"room_array":[{"room_type":"0","0":"0","room_author":"admin","1":"admin","room_name":"Fun Talk","2":"Fun Talk","room_id":"1","3":"1","online_count":"0","4":"0"},{"room_type":"0","0":"0","room_author":"admin","1":"admin","room_name":"Think out loud","2":"Think out loud","room_id":"3","3":"3","online_count":"0","4":"0"},{"room_type":"0","0":"0","room_author":"admin","1":"admin","room_name":"Talk to me ","2":"Talk to me ","room_id":"4","3":"4","online_count":"0","4":"0"},{"room_type":"0","0":"0","room_author":"admin","1":"admin","room_name":"Talk innovative","2":"Talk innovative","room_id":"5","3":"5","online_count":"0","4":"0"},{"room_type":"0","0":"0","room_author":"admin","1":"admin","room_name":"Crazy chat","2":"Crazy chat","room_id":"2","3":"2","online_count":"0","4":"0"}],"room_online_count":[{"id":"1","0":"1","online_count":"0","1":"0"},{"id":"3","0":"3","online_count":"0","1":"0"},{"id":"4","0":"4","online_count":"0","1":"0"},{"id":"5","0":"5","online_count":"0","1":"0"},{"id":"2","0":"2","online_count":"0","1":"0"}],"chatroom_users_array":[],"in_room":-1,"islog":"userloggedin","status":1,"count":0,"username":"alfredopacino","userid":"827","is_guest":"0","time":"14070065950.402204001407006595","messages":[],"chatroom_messages":[],"last_chatroom_usr_id":null,"chatroom_mesg_time":"14070065950.402490001407006595"}
that&#039;s not the only silly mistake.. the table&#039;s name is community_fields_value**S**! BUT i fixed those 2 errors and i still dont get the user list (doh) EDIT: wait a min: now thats the response of the freichat request ... what the hack ```` SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, v.value AS country FROM frei_session AS f LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid LEFT JOIN z27s5_community_fields_values AS v ON v.user_id=f.session_id WHERE time&amp;gt;1407006515 AND f.session_id!=827 AND f.status!=2 AND f.status!=0 AND v.field_id=11SELECT DISTINCT u.avatar,f.status_mesg,f.username,f.session_id,f.status,f.guest,u.alias AS profile_iden,f.in_room, v.value AS country FROM frei_session AS f LEFT JOIN z27s5_community_users AS u ON f.session_id=u.userid LEFT JOIN z27s5_community_fields_values AS v ON v.user_id=f.session_id WHERE time&amp;gt;1407006515 AND f.session_id!=827 AND f.status!=2 AND f.status!=0 AND v.field_id=11{&quot;userdata&quot;:[],&quot;room_array&quot;:[{&quot;room_type&quot;:&quot;0&quot;,&quot;0&quot;:&quot;0&quot;,&quot;room_author&quot;:&quot;admin&quot;,&quot;1&quot;:&quot;admin&quot;,&quot;room_name&quot;:&quot;Fun Talk&quot;,&quot;2&quot;:&quot;Fun Talk&quot;,&quot;room_id&quot;:&quot;1&quot;,&quot;3&quot;:&quot;1&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;4&quot;:&quot;0&quot;},{&quot;room_type&quot;:&quot;0&quot;,&quot;0&quot;:&quot;0&quot;,&quot;room_author&quot;:&quot;admin&quot;,&quot;1&quot;:&quot;admin&quot;,&quot;room_name&quot;:&quot;Think out loud&quot;,&quot;2&quot;:&quot;Think out loud&quot;,&quot;room_id&quot;:&quot;3&quot;,&quot;3&quot;:&quot;3&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;4&quot;:&quot;0&quot;},{&quot;room_type&quot;:&quot;0&quot;,&quot;0&quot;:&quot;0&quot;,&quot;room_author&quot;:&quot;admin&quot;,&quot;1&quot;:&quot;admin&quot;,&quot;room_name&quot;:&quot;Talk to me &quot;,&quot;2&quot;:&quot;Talk to me &quot;,&quot;room_id&quot;:&quot;4&quot;,&quot;3&quot;:&quot;4&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;4&quot;:&quot;0&quot;},{&quot;room_type&quot;:&quot;0&quot;,&quot;0&quot;:&quot;0&quot;,&quot;room_author&quot;:&quot;admin&quot;,&quot;1&quot;:&quot;admin&quot;,&quot;room_name&quot;:&quot;Talk innovative&quot;,&quot;2&quot;:&quot;Talk innovative&quot;,&quot;room_id&quot;:&quot;5&quot;,&quot;3&quot;:&quot;5&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;4&quot;:&quot;0&quot;},{&quot;room_type&quot;:&quot;0&quot;,&quot;0&quot;:&quot;0&quot;,&quot;room_author&quot;:&quot;admin&quot;,&quot;1&quot;:&quot;admin&quot;,&quot;room_name&quot;:&quot;Crazy chat&quot;,&quot;2&quot;:&quot;Crazy chat&quot;,&quot;room_id&quot;:&quot;2&quot;,&quot;3&quot;:&quot;2&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;4&quot;:&quot;0&quot;}],&quot;room_online_count&quot;:[{&quot;id&quot;:&quot;1&quot;,&quot;0&quot;:&quot;1&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;1&quot;:&quot;0&quot;},{&quot;id&quot;:&quot;3&quot;,&quot;0&quot;:&quot;3&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;1&quot;:&quot;0&quot;},{&quot;id&quot;:&quot;4&quot;,&quot;0&quot;:&quot;4&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;1&quot;:&quot;0&quot;},{&quot;id&quot;:&quot;5&quot;,&quot;0&quot;:&quot;5&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;1&quot;:&quot;0&quot;},{&quot;id&quot;:&quot;2&quot;,&quot;0&quot;:&quot;2&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;1&quot;:&quot;0&quot;}],&quot;chatroom_users_array&quot;:[],&quot;in_room&quot;:-1,&quot;islog&quot;:&quot;userloggedin&quot;,&quot;status&quot;:1,&quot;count&quot;:0,&quot;username&quot;:&quot;alfredopacino&quot;,&quot;userid&quot;:&quot;827&quot;,&quot;is_guest&quot;:&quot;0&quot;,&quot;time&quot;:&quot;14070065950.402204001407006595&quot;,&quot;messages&quot;:[],&quot;chatroom_messages&quot;:[],&quot;last_chatroom_usr_id&quot;:null,&quot;chatroom_mesg_time&quot;:&quot;14070065950.402490001407006595&quot;} ````

ok i guess i solve, now the query works i just removed that echo you said to decomment smile

just a last thing i need about multilanguage:
soon i will translate the site in chinese, so since there is no freichat chinese translation, i need something to make the chat english (as i set in freichat backend) with chinese joomla.
With the current code i think i will face another error smile
so i need something like:

if(FREICHAT HAS THIS TRANSLATION) $this->lang = $_SESSION['frei_lang'];  
else $this->lang='en-GB';

anyway thanks, awesome support.

ok i guess i solve, now the query works i just removed that echo you said to decomment :) just a last thing i need about multilanguage: soon i will translate the site in chinese, so since there is no freichat chinese translation, i need something to make the chat english (as i set in freichat backend) with chinese joomla. With the current code i think i will face another error :) so i need something like: ```` if(FREICHAT HAS THIS TRANSLATION) $this-&amp;gt;lang = $_SESSION[&#039;frei_lang&#039;]; else $this-&amp;gt;lang=&#039;en-GB&#039;; ```` anyway thanks, awesome support.

FreiChat by default loads the english translations if the language file is not present .
The only problem is the errors are not hidden, so freichat stops working .

So, to make freichat load even if a language file is not present, make the following change:

Open freichat/arg.php, Around line 318 , replace

$OtherLangInc = require 'lang/' . $this->lang . '.php';

with

$OtherLangInc = @include 'lang/' . $this->lang . '.php';
FreiChat by default loads the english translations if the language file is not present . The only problem is the errors are not hidden, so freichat stops working . So, to make freichat load even if a language file is not present, make the following change: Open freichat/arg.php, Around line 318 , replace ``` $OtherLangInc = require &#039;lang/&#039; . $this-&amp;gt;lang . &#039;.php&#039;; ``` with ``` $OtherLangInc = @include &#039;lang/&#039; . $this-&amp;gt;lang . &#039;.php&#039;; ```

ok thanks, done that.

don't you think you should implement this feature in the next release? smile

ok thanks, done that. don&#039;t you think you should implement this feature in the next release? :)
12
678
22
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