FreiChat related discussions
Language problem

Hi

I just downloaded the free ver. of FreiChat 10.0 and followed the instructions to install it on my website. Al done as expected except one thing.
The language file doens't seem to work even if I changed it into the backend. I have translated into my language. The same stands for every language I tried.
It always show English.
Am I doing something wrong?
Thanks in advance

Hi I just downloaded the free ver. of FreiChat 10.0 and followed the instructions to install it on my website. Al done as expected except one thing. The language file doens't seem to work even if I changed it into the backend. I have translated into my language. The same stands for every language I tried. It always show English. Am I doing something wrong? Thanks in advance
edited Nov 20 '15 at 2:53 pm

Hi

I found the solution as I wrote above....

However I have another problem, language related again..Can I describe it here or open another topic?

The new problem has to do with the translations of the v.9.6 which is on the language php file. It seems that they don't work as expected in file sent and email sent messages giving unreadable characters.

When I try to send a file, the file send successfully but the messages in the box is not the Greek it should be.
The same problem stands when I send a chat via email. When the receiver receives an email, the email subject is with #954;#946..

Any idea?

Thanks

Hi I found the solution as I wrote above.... However I have another problem, language related again..Can I describe it here or open another topic? The new problem has to do with the translations of the v.9.6 which is on the language php file. It seems that they don't work as expected in file sent and email sent messages giving unreadable characters. When I try to send a file, the file send successfully but the messages in the box is not the Greek it should be. The same problem stands when I send a chat via email. When the receiver receives an email, the email subject is with #954;#946.. Any idea? Thanks
edited Nov 19 '15 at 6:10 pm

arg.php


<?php

date_default_timezone_set('GMT');


/* < Hard code */
require_once 'hardcode.php';
/* Hard code /> */



require_once 'define.php';

class FreiChat {

    public function __construct() {


        global $dsn,$db_user,$db_pass, $driver, $db_prefix, $uid, $debug, $PATH, $smtp_username, $smtp_password;
        $this->dsn = $dsn;
        $this->driver = $driver;
        $this->db_prefix = $db_prefix;
        $this->uid = $uid;
        $this->PATH = $PATH;
        $this->smtp_username = $smtp_username;
        $this->smtp_password = $smtp_password;


        $parts = explode(":",$dsn);
        $this->pdo_driver = $parts[0];

        global $use_cookie;

        if($use_cookie == 'false') {
            $this->use_cookie = false;
        }else{
            $this->use_cookie = $use_cookie;            
        }



        global $usertable, $row_username, $row_userid, $avatar_field_name, $force_load_jquery;
        $this->usertable = $usertable;
        $this->row_username = $row_username;
        $this->row_userid = $row_userid;
        $this->avatar_field_name = $avatar_field_name;
        $this->force_load_jquery = $force_load_jquery;

        $this->time_string = strtotime(date("Y-m-d H:i:s"));

        $this->online_time = ($this->time_string - 10);
        $this->online_time2 = ($this->time_string - 80);

        global $custom_error_handling;
        $this->custom_error_handling = $custom_error_handling;


        $this->db = DB_conn::get_connection($dsn, $db_user, $db_pass);
        //$this->init_vars();
    }

    public function build_vars() {
        $query = "SELECT * FROM frei_config";
        $variables = $this->db->query($query);
        $variables = $variables->fetchAll();
        $args = array();

        /* require_once 'server/drivers/'.$this->driver.'.php';
          $driver = new $this->driver($this->db);
          $driver->db_prefix = $this->db_prefix; */

        foreach ($variables as $variable) {

            if ($variable['subcat'] != 'NULL') {
                //    var_dump($variable);
                $args[$variable['key']][$variable['cat']][$variable['subcat']] = $variable['val'];
            } else if ($variable['cat'] != 'NULL') {
                $args[$variable['key']][$variable['cat']] = $variable['val'];
            } else {
                $args[$variable['key']] = $variable['val'];
            }
        }

        $args['x_config'] = null; //not req. $driver->x_config();
        $this->db_vars = $args;
        return $args;
    }

    public static function build_paths() {
        if (!defined('RDIR')) {
            define('RDIR', dirname(__FILE__));
            define('PARENTDIR', dirname(RDIR));
        }

        if (@$_SERVER["HTTPS"] == "on") {
            $protocol = "https://";
        } else {
            $protocol = "http://";
        }
        return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
    }

    public function return_boolean($variable) {
        if ($variable == "true")
            return true;
        return false;
    }

    public function init_vars() {

        $parameters = $this->build_vars();

        $this->url = self::build_paths();
        $this->show_name = $parameters['show_name']; //you can have guest or user
        $this->displayname = $parameters['displayname']; //you can have username / name(nickname)
        $this->debug = $this->return_boolean($parameters['debug']); //option for debugging ,default is false
        $this->freichat_theme = $parameters['freichat_theme'];
        $this->css = $this->freichat_theme; //background color
        $this->color = $this->css; //colour for chatbuttons
        $this->lang = $parameters['lang']; //Language please do not include .php here only file name
        $this->cache = 'disabled';
        $this->ug_ids = $parameters['ug_ids'];

        $this->show_chatroom_plugin = 'enabled';
        $this->show_videochat_plugin = 'disabled';
        $this->show_mobilechat_plugin = 'disabled';
        $this->x_config = $parameters['x_config'];
        $this->chat_time_shown_always = $parameters['chat_time_shown_always'];
        $this->allow_guest_name_change = $parameters['allow_guest_name_change'];

        $this->chatroom_expiry = $parameters['plugins']['chatroom']['chatroom_expiry'];

        //long polling
        $this->long_polling = $parameters['polling'];
        $this->poll_time = $parameters['polling_time'];
        $this->chatspeed = $parameters['chatspeed'];

        //link profile
        $this->linkprofile = $parameters['link_profile'];
        $this->sef_link_profile = $parameters['sef_link_profile'];
        //CUSTOM DRIVER
        $this->to_freichat_path = $this->PATH;


        $this->show_avatar = $parameters['show_avatar']; //Can have block or none
        $this->frei_trans = $this->inc_lang();
    $this->mysql_now = date("Y-m-d H:i:s");
        $this->time_string = strtotime($this->mysql_now);

        $this->online_time = ($this->time_string - 10);
        $this->online_time2 = ($this->time_string - 80);
        $this->permanent_id = time() + rand(100000, 500000);
        //$this->frei_trans['g_prefix'] = htmlspecialchars($this->frei_trans['g_prefix'], ENT_QUOTES, "UTF-8");
        $this->permanent_name = $this->frei_trans['g_prefix'] . base_convert($this->permanent_id, 6, 36);
    }

    public function get_js_config() {

        $parameters = $this->db_vars;

        $this->fxval = $parameters['fxval']; //Set it to false if you do not want animations
        $this->draggable = $parameters['draggable'];
        $this->conflict = $parameters['conflict']; //Jquery Conflicts 'true' or ''
        $this->msgSendSpeed = $parameters['msgSendSpeed']; //Message are sent after 1 second of post, reducing it will increase FreiChat message sending speed but also will send more requests to the server! NOTE:: Do not decrease it below 1000
        $this->content_height = $parameters['content_height']; //option to auto resize the chatbox content based on content or set fixed height
        $this->user_defined_chatbox_content_status = $parameters['chatbox_status']; //if true , user can permanantly inimze or maximize the chatbox

        $this->load = $parameters['load']; //chatbox
        $this->dyncss = 'disable'; //template patch
        $this->evnixpower = 'visible'; //powered by evnix
        $this->show_chatbox = '';
        $this->time = $parameters['time']; //In seconds
        $this->GZIP_handler = $parameters['GZIP_handler'];
        $this->BOOT = $parameters['BOOT']; // Load freichat -> y or n?
        $this->exit_for_guests = $parameters['exit_for_guests']; // Do not load if guest

        $this->JSdebug = $this->return_boolean($parameters['JSdebug']); // Javascript debug info shown in firebug (firefox extension). No quotes around true or false
        $this->busy_timeOut = $parameters['busy_timeOut']; //In seconds user will be switched to busy status
        $this->offline_timeOut = $parameters['offline_timeOut']; //In seconds user will be switched to offline status
        $this->addedoptions_visibility = $parameters['addedoptions_visibility']; //if the addedoption should be visible when chat window is created


        /* FreiChat plugins */

        // File sending
        $this->show_file_sending_plugin = $parameters['plugins']['file_sender']['show'];
        $this->file_size_limit = ($parameters['plugins']['file_sender']['file_size']) * 1024; //In Kilobytes
        $this->expirytime = $parameters['plugins']['file_sender']['expiry']; //In minutes after which the uploaded files will be deleted
        $this->valid_exts = $parameters['plugins']['file_sender']['valid_exts']; //valid extensions separated by comma
        $this->playsound = $parameters["playsound"];
        //coversation save
        $this->show_save_plugin = 'enabled';

        //smiley plugin
        $this->show_smiley_plugin = 'enabled';

        //send conversation plugin
        $this->show_mail_plugin = 'enabled';

        $this->chatroom_location = $parameters['plugins']['chatroom']['location'];
        $this->chatroom_autoclose = $parameters['plugins']['chatroom']['autoclose'];
        $this->chatroom_offset = $parameters['plugins']['chatroom']['offset'];
        $this->chatroom_label_offset = $parameters['plugins']['chatroom']['label_offset'];
        $this->chatroom_override_positions = $parameters['plugins']['chatroom']['override_positions'];

        $this->mailtype = $parameters["plugins"]["send_conv"]["mailtype"];
        $this->smtp_server = $parameters["plugins"]["send_conv"]["smtp_server"];
        $this->smtp_port = $parameters["plugins"]["send_conv"]["smtp_port"];
        $this->smtp_protocol = $parameters["plugins"]["send_conv"]["smtp_protocol"];
        $this->mail_from_address = $parameters["plugins"]["send_conv"]["from_address"];
        $this->mail_from_name = $parameters["plugins"]["send_conv"]["from_name"];
    }

    public function get_acl() {
        $parameters = $this->db_vars;

        $ACL = array(
            'CHAT' => array(
                'user'  => $parameters['ACL']['chat']['user'],
                'guest' => $parameters['ACL']['chat']['guest']
            ),
            'FILE' => array(
                'user'  => $parameters['ACL']['filesend']['user'],
                'guest' => $parameters['ACL']['filesend']['guest']
            ),
            'TRANSLATE' => array(
                'user'  => 'noallow',
                'guest' => 'noallow'
            ),
            'SAVE' => array(
                'user'  => $parameters['ACL']['save']['user'],
                'guest' => $parameters['ACL']['save']['guest']
            ),
            'SMILEY' => array(
                'user'  => $parameters['ACL']['smiley']['user'],
                'guest' => $parameters['ACL']['smiley']['guest']
            ),
            'MAIL' => array(
                'user'  => $parameters['ACL']['mail']['user'],
                'guest' => $parameters['ACL']['mail']['guest']
            ),
            'VIDEOCHAT' => array(
                'user'  => $parameters['ACL']['video']['user'],
                'guest' => $parameters['ACL']['video']['guest']
            ),
            'CHATROOM' => array(
                'user'  => $parameters['ACL']['chatroom']['user'],
                'guest' => $parameters['ACL']['chatroom']['guest']
            ),
            'MOBILECHAT' => array(
                'user'  => 'allow',
                'guest' => 'allow'
            ),
            'CHATROOM_CRT' => array(
                'user'  => $parameters['ACL']['chatroom_crt']['user'],
                'guest' => $parameters['ACL']['chatroom_crt']['guest']
            ),
            'FORMATTER' => array(
                'user'  => "allow",
                'guest' => "allow"
            ),
            'GROUPCHAT' => array(
                'user'  => $parameters['ACL']['groupchat']['user'],
                'guest' => "noallow"
            )

        );
        return $ACL;
    }

    public function get_smileys() {

        $query = "SELECT symbol,image_name FROM frei_smileys";

        $result = $this->db->query($query);
        return $result->fetchAll();
    }

    public function get_all_vars() {
        $this->get_js_config();
        $this->get_acl();
    }

//------------------------------------------------------------------------------------------------
    public function freichat_debug($message) {
        if ($this->debug == true) {
            $dbgfile = fopen("../freixlog.log", "a");
            fwrite($dbgfile, "\n" . date("F j, Y, g:i a") . ": " . $message . "\n");
        }
    }

//----------------------------------------------------------------------------------------------
    public function bigintval($value) {
        $value = trim($value);
        if (ctype_digit($value)) {
            return $value;
        }
        $value = preg_replace("/[^0-9](.*)$/", '', $value);
        if (ctype_digit($value)) {
            return $value;
        }
        return 0;
    }

//----------------------------------------------------------------------------------------------

    public function inc_lang() {

        //$frei_trans declared in  language file

        if ($this->lang != 'english') {
            if (empty($frei_trans)) {
                $EnglishLangInc = require 'lang/english.php';
                if ($EnglishLangInc != 1) {
                    $this->freichat_debug('Enlish language file could not be included');
                }
            } else {
                $this->freichat_debug('frei_trans array already in use!');
            }


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

            if ($OtherLangInc != 1) {
                $this->freichat_debug('Some error while including' . $this->lang . ' language file');
            }
        } else if ($this->lang == 'english') {
            $EnglishLangInc = require 'lang/english.php';

            if ($EnglishLangInc != 1) {
                $this->freichat_debug('path to english language incorrect');
            }
        } else {
            $this->freichat_debug('Wrong filename given in parameter');
        }
        return $frei_trans;
    }

}
arg.php -------------------- ```` &amp;lt;?php date_default_timezone_set(&#039;GMT&#039;); /* &amp;lt; Hard code */ require_once &#039;hardcode.php&#039;; /* Hard code /&amp;gt; */ require_once &#039;define.php&#039;; class FreiChat { public function __construct() { global $dsn,$db_user,$db_pass, $driver, $db_prefix, $uid, $debug, $PATH, $smtp_username, $smtp_password; $this-&amp;gt;dsn = $dsn; $this-&amp;gt;driver = $driver; $this-&amp;gt;db_prefix = $db_prefix; $this-&amp;gt;uid = $uid; $this-&amp;gt;PATH = $PATH; $this-&amp;gt;smtp_username = $smtp_username; $this-&amp;gt;smtp_password = $smtp_password; $parts = explode(&quot;:&quot;,$dsn); $this-&amp;gt;pdo_driver = $parts[0]; global $use_cookie; if($use_cookie == &#039;false&#039;) { $this-&amp;gt;use_cookie = false; }else{ $this-&amp;gt;use_cookie = $use_cookie; } global $usertable, $row_username, $row_userid, $avatar_field_name, $force_load_jquery; $this-&amp;gt;usertable = $usertable; $this-&amp;gt;row_username = $row_username; $this-&amp;gt;row_userid = $row_userid; $this-&amp;gt;avatar_field_name = $avatar_field_name; $this-&amp;gt;force_load_jquery = $force_load_jquery; $this-&amp;gt;time_string = strtotime(date(&quot;Y-m-d H:i:s&quot;)); $this-&amp;gt;online_time = ($this-&amp;gt;time_string - 10); $this-&amp;gt;online_time2 = ($this-&amp;gt;time_string - 80); global $custom_error_handling; $this-&amp;gt;custom_error_handling = $custom_error_handling; $this-&amp;gt;db = DB_conn::get_connection($dsn, $db_user, $db_pass); //$this-&amp;gt;init_vars(); } public function build_vars() { $query = &quot;SELECT * FROM frei_config&quot;; $variables = $this-&amp;gt;db-&amp;gt;query($query); $variables = $variables-&amp;gt;fetchAll(); $args = array(); /* require_once &#039;server/drivers/&#039;.$this-&amp;gt;driver.&#039;.php&#039;; $driver = new $this-&amp;gt;driver($this-&amp;gt;db); $driver-&amp;gt;db_prefix = $this-&amp;gt;db_prefix; */ foreach ($variables as $variable) { if ($variable[&#039;subcat&#039;] != &#039;NULL&#039;) { // var_dump($variable); $args[$variable[&#039;key&#039;]][$variable[&#039;cat&#039;]][$variable[&#039;subcat&#039;]] = $variable[&#039;val&#039;]; } else if ($variable[&#039;cat&#039;] != &#039;NULL&#039;) { $args[$variable[&#039;key&#039;]][$variable[&#039;cat&#039;]] = $variable[&#039;val&#039;]; } else { $args[$variable[&#039;key&#039;]] = $variable[&#039;val&#039;]; } } $args[&#039;x_config&#039;] = null; //not req. $driver-&amp;gt;x_config(); $this-&amp;gt;db_vars = $args; return $args; } public static function build_paths() { if (!defined(&#039;RDIR&#039;)) { define(&#039;RDIR&#039;, dirname(__FILE__)); define(&#039;PARENTDIR&#039;, dirname(RDIR)); } if (@$_SERVER[&quot;HTTPS&quot;] == &quot;on&quot;) { $protocol = &quot;https://&quot;; } else { $protocol = &quot;http://&quot;; } return $protocol . $_SERVER[&#039;HTTP_HOST&#039;] . $_SERVER[&#039;SCRIPT_NAME&#039;]; } public function return_boolean($variable) { if ($variable == &quot;true&quot;) return true; return false; } public function init_vars() { $parameters = $this-&amp;gt;build_vars(); $this-&amp;gt;url = self::build_paths(); $this-&amp;gt;show_name = $parameters[&#039;show_name&#039;]; //you can have guest or user $this-&amp;gt;displayname = $parameters[&#039;displayname&#039;]; //you can have username / name(nickname) $this-&amp;gt;debug = $this-&amp;gt;return_boolean($parameters[&#039;debug&#039;]); //option for debugging ,default is false $this-&amp;gt;freichat_theme = $parameters[&#039;freichat_theme&#039;]; $this-&amp;gt;css = $this-&amp;gt;freichat_theme; //background color $this-&amp;gt;color = $this-&amp;gt;css; //colour for chatbuttons $this-&amp;gt;lang = $parameters[&#039;lang&#039;]; //Language please do not include .php here only file name $this-&amp;gt;cache = &#039;disabled&#039;; $this-&amp;gt;ug_ids = $parameters[&#039;ug_ids&#039;]; $this-&amp;gt;show_chatroom_plugin = &#039;enabled&#039;; $this-&amp;gt;show_videochat_plugin = &#039;disabled&#039;; $this-&amp;gt;show_mobilechat_plugin = &#039;disabled&#039;; $this-&amp;gt;x_config = $parameters[&#039;x_config&#039;]; $this-&amp;gt;chat_time_shown_always = $parameters[&#039;chat_time_shown_always&#039;]; $this-&amp;gt;allow_guest_name_change = $parameters[&#039;allow_guest_name_change&#039;]; $this-&amp;gt;chatroom_expiry = $parameters[&#039;plugins&#039;][&#039;chatroom&#039;][&#039;chatroom_expiry&#039;]; //long polling $this-&amp;gt;long_polling = $parameters[&#039;polling&#039;]; $this-&amp;gt;poll_time = $parameters[&#039;polling_time&#039;]; $this-&amp;gt;chatspeed = $parameters[&#039;chatspeed&#039;]; //link profile $this-&amp;gt;linkprofile = $parameters[&#039;link_profile&#039;]; $this-&amp;gt;sef_link_profile = $parameters[&#039;sef_link_profile&#039;]; //CUSTOM DRIVER $this-&amp;gt;to_freichat_path = $this-&amp;gt;PATH; $this-&amp;gt;show_avatar = $parameters[&#039;show_avatar&#039;]; //Can have block or none $this-&amp;gt;frei_trans = $this-&amp;gt;inc_lang(); $this-&amp;gt;mysql_now = date(&quot;Y-m-d H:i:s&quot;); $this-&amp;gt;time_string = strtotime($this-&amp;gt;mysql_now); $this-&amp;gt;online_time = ($this-&amp;gt;time_string - 10); $this-&amp;gt;online_time2 = ($this-&amp;gt;time_string - 80); $this-&amp;gt;permanent_id = time() + rand(100000, 500000); //$this-&amp;gt;frei_trans[&#039;g_prefix&#039;] = htmlspecialchars($this-&amp;gt;frei_trans[&#039;g_prefix&#039;], ENT_QUOTES, &quot;UTF-8&quot;); $this-&amp;gt;permanent_name = $this-&amp;gt;frei_trans[&#039;g_prefix&#039;] . base_convert($this-&amp;gt;permanent_id, 6, 36); } public function get_js_config() { $parameters = $this-&amp;gt;db_vars; $this-&amp;gt;fxval = $parameters[&#039;fxval&#039;]; //Set it to false if you do not want animations $this-&amp;gt;draggable = $parameters[&#039;draggable&#039;]; $this-&amp;gt;conflict = $parameters[&#039;conflict&#039;]; //Jquery Conflicts &#039;true&#039; or &#039;&#039; $this-&amp;gt;msgSendSpeed = $parameters[&#039;msgSendSpeed&#039;]; //Message are sent after 1 second of post, reducing it will increase FreiChat message sending speed but also will send more requests to the server! NOTE:: Do not decrease it below 1000 $this-&amp;gt;content_height = $parameters[&#039;content_height&#039;]; //option to auto resize the chatbox content based on content or set fixed height $this-&amp;gt;user_defined_chatbox_content_status = $parameters[&#039;chatbox_status&#039;]; //if true , user can permanantly inimze or maximize the chatbox $this-&amp;gt;load = $parameters[&#039;load&#039;]; //chatbox $this-&amp;gt;dyncss = &#039;disable&#039;; //template patch $this-&amp;gt;evnixpower = &#039;visible&#039;; //powered by evnix $this-&amp;gt;show_chatbox = &#039;&#039;; $this-&amp;gt;time = $parameters[&#039;time&#039;]; //In seconds $this-&amp;gt;GZIP_handler = $parameters[&#039;GZIP_handler&#039;]; $this-&amp;gt;BOOT = $parameters[&#039;BOOT&#039;]; // Load freichat -&amp;gt; y or n? $this-&amp;gt;exit_for_guests = $parameters[&#039;exit_for_guests&#039;]; // Do not load if guest $this-&amp;gt;JSdebug = $this-&amp;gt;return_boolean($parameters[&#039;JSdebug&#039;]); // Javascript debug info shown in firebug (firefox extension). No quotes around true or false $this-&amp;gt;busy_timeOut = $parameters[&#039;busy_timeOut&#039;]; //In seconds user will be switched to busy status $this-&amp;gt;offline_timeOut = $parameters[&#039;offline_timeOut&#039;]; //In seconds user will be switched to offline status $this-&amp;gt;addedoptions_visibility = $parameters[&#039;addedoptions_visibility&#039;]; //if the addedoption should be visible when chat window is created /* FreiChat plugins */ // File sending $this-&amp;gt;show_file_sending_plugin = $parameters[&#039;plugins&#039;][&#039;file_sender&#039;][&#039;show&#039;]; $this-&amp;gt;file_size_limit = ($parameters[&#039;plugins&#039;][&#039;file_sender&#039;][&#039;file_size&#039;]) * 1024; //In Kilobytes $this-&amp;gt;expirytime = $parameters[&#039;plugins&#039;][&#039;file_sender&#039;][&#039;expiry&#039;]; //In minutes after which the uploaded files will be deleted $this-&amp;gt;valid_exts = $parameters[&#039;plugins&#039;][&#039;file_sender&#039;][&#039;valid_exts&#039;]; //valid extensions separated by comma $this-&amp;gt;playsound = $parameters[&quot;playsound&quot;]; //coversation save $this-&amp;gt;show_save_plugin = &#039;enabled&#039;; //smiley plugin $this-&amp;gt;show_smiley_plugin = &#039;enabled&#039;; //send conversation plugin $this-&amp;gt;show_mail_plugin = &#039;enabled&#039;; $this-&amp;gt;chatroom_location = $parameters[&#039;plugins&#039;][&#039;chatroom&#039;][&#039;location&#039;]; $this-&amp;gt;chatroom_autoclose = $parameters[&#039;plugins&#039;][&#039;chatroom&#039;][&#039;autoclose&#039;]; $this-&amp;gt;chatroom_offset = $parameters[&#039;plugins&#039;][&#039;chatroom&#039;][&#039;offset&#039;]; $this-&amp;gt;chatroom_label_offset = $parameters[&#039;plugins&#039;][&#039;chatroom&#039;][&#039;label_offset&#039;]; $this-&amp;gt;chatroom_override_positions = $parameters[&#039;plugins&#039;][&#039;chatroom&#039;][&#039;override_positions&#039;]; $this-&amp;gt;mailtype = $parameters[&quot;plugins&quot;][&quot;send_conv&quot;][&quot;mailtype&quot;]; $this-&amp;gt;smtp_server = $parameters[&quot;plugins&quot;][&quot;send_conv&quot;][&quot;smtp_server&quot;]; $this-&amp;gt;smtp_port = $parameters[&quot;plugins&quot;][&quot;send_conv&quot;][&quot;smtp_port&quot;]; $this-&amp;gt;smtp_protocol = $parameters[&quot;plugins&quot;][&quot;send_conv&quot;][&quot;smtp_protocol&quot;]; $this-&amp;gt;mail_from_address = $parameters[&quot;plugins&quot;][&quot;send_conv&quot;][&quot;from_address&quot;]; $this-&amp;gt;mail_from_name = $parameters[&quot;plugins&quot;][&quot;send_conv&quot;][&quot;from_name&quot;]; } public function get_acl() { $parameters = $this-&amp;gt;db_vars; $ACL = array( &#039;CHAT&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;chat&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;chat&#039;][&#039;guest&#039;] ), &#039;FILE&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;filesend&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;filesend&#039;][&#039;guest&#039;] ), &#039;TRANSLATE&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; &#039;noallow&#039;, &#039;guest&#039; =&amp;gt; &#039;noallow&#039; ), &#039;SAVE&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;save&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;save&#039;][&#039;guest&#039;] ), &#039;SMILEY&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;smiley&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;smiley&#039;][&#039;guest&#039;] ), &#039;MAIL&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;mail&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;mail&#039;][&#039;guest&#039;] ), &#039;VIDEOCHAT&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;video&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;video&#039;][&#039;guest&#039;] ), &#039;CHATROOM&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;chatroom&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;chatroom&#039;][&#039;guest&#039;] ), &#039;MOBILECHAT&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; &#039;allow&#039;, &#039;guest&#039; =&amp;gt; &#039;allow&#039; ), &#039;CHATROOM_CRT&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;chatroom_crt&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;chatroom_crt&#039;][&#039;guest&#039;] ), &#039;FORMATTER&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; &quot;allow&quot;, &#039;guest&#039; =&amp;gt; &quot;allow&quot; ), &#039;GROUPCHAT&#039; =&amp;gt; array( &#039;user&#039; =&amp;gt; $parameters[&#039;ACL&#039;][&#039;groupchat&#039;][&#039;user&#039;], &#039;guest&#039; =&amp;gt; &quot;noallow&quot; ) ); return $ACL; } public function get_smileys() { $query = &quot;SELECT symbol,image_name FROM frei_smileys&quot;; $result = $this-&amp;gt;db-&amp;gt;query($query); return $result-&amp;gt;fetchAll(); } public function get_all_vars() { $this-&amp;gt;get_js_config(); $this-&amp;gt;get_acl(); } //------------------------------------------------------------------------------------------------ public function freichat_debug($message) { if ($this-&amp;gt;debug == true) { $dbgfile = fopen(&quot;../freixlog.log&quot;, &quot;a&quot;); fwrite($dbgfile, &quot;\n&quot; . date(&quot;F j, Y, g:i a&quot;) . &quot;: &quot; . $message . &quot;\n&quot;); } } //---------------------------------------------------------------------------------------------- public function bigintval($value) { $value = trim($value); if (ctype_digit($value)) { return $value; } $value = preg_replace(&quot;/[^0-9](.*)$/&quot;, &#039;&#039;, $value); if (ctype_digit($value)) { return $value; } return 0; } //---------------------------------------------------------------------------------------------- public function inc_lang() { //$frei_trans declared in language file if ($this-&amp;gt;lang != &#039;english&#039;) { if (empty($frei_trans)) { $EnglishLangInc = require &#039;lang/english.php&#039;; if ($EnglishLangInc != 1) { $this-&amp;gt;freichat_debug(&#039;Enlish language file could not be included&#039;); } } else { $this-&amp;gt;freichat_debug(&#039;frei_trans array already in use!&#039;); } $OtherLangInc = @include &#039;lang/&#039; . $this-&amp;gt;lang . &#039;.php&#039;; if ($OtherLangInc != 1) { $this-&amp;gt;freichat_debug(&#039;Some error while including&#039; . $this-&amp;gt;lang . &#039; language file&#039;); } } else if ($this-&amp;gt;lang == &#039;english&#039;) { $EnglishLangInc = require &#039;lang/english.php&#039;; if ($EnglishLangInc != 1) { $this-&amp;gt;freichat_debug(&#039;path to english language incorrect&#039;); } } else { $this-&amp;gt;freichat_debug(&#039;Wrong filename given in parameter&#039;); } return $frei_trans; } } ````

Hi

The problem with the characters on file upload and/or email has to do possibly with the plugins files which can't handle the UTF-8 characters correctly.
I saw that the names added correctly in the db using the chat BUT when something added through the file procedure it puts characters like this: &#924

Any help from the Freichat developers?

Thanks!

Hi The problem with the characters on file upload and/or email has to do possibly with the plugins files which can&#039;t handle the UTF-8 characters correctly. I saw that the names added correctly in the db using the chat BUT when something added through the file procedure it puts characters like this: &amp;amp;#924 Any help from the Freichat developers? Thanks!
edited Nov 20 '15 at 3:04 pm

I think I found a solution using the header as UTF-8
http://php.net/manual/en/function.header.php

<?php header('Content-Type: text/html; charset=utf-8'); ?>
I think I found a solution using the header as UTF-8 http://php.net/manual/en/function.header.php ```` &amp;lt;?php header(&#039;Content-Type: text/html; charset=utf-8&#039;); ?&amp;gt; ````

i think the problem is in htmlentities function in sys/CODOF/format.php file. You can use htmlentities function instead and greek characters will be displayed correctly

i think the problem is in htmlentities function in sys/CODOF/format.php file. You can use htmlentities function instead and greek characters will be displayed correctly
218
8
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