Contributions > Plugins, tips, and tricks

Patch for using RTL and LTR chat templates at one site

(1/1)

olegp:
Hi!

If anyone need to support users simultaneously for RTL and LTR scripting languages, do follow:

1. add to /libs/chat.php function


--- Code: ---function get_user_lang($id){
        $link = connect();
        $z_lang = select_one_row("select locale from chatthread where threadid = ".$id, $link);
        return $z_lang[locale];
        mysql_close($link);
}
--- End code ---

2. add code to /operator/agent.php in between lines 21 and 23


--- Code: ---21: $operator = check_login();
--- End code ---

put this code here -

--- Code: ---if (isset($_REQUEST[thread])){
    if (get_user_lang($_REQUEST[thread])=='he'){
        $chatstyle="techheb";
    }else{
        $chatstyle=getchatstyle();
    }
}else{
    $chatstyle=getchatstyle();
}
--- End code ---


--- Code: ---23: loadsettings();
--- End code ---

3. You also need use different chat window styles for rtl and rtl languages. Do not forget to change button code.

If anyone need this template - write PM.

svipic:
i have problem with hebrew

I CAN'T FIGURE OUT HOW TO CHANGE THE LOCATION FROM LEFT TO RIGHT IN IFRAME IN CHAT WINDOW

Everything is working fine but in IFRAME the CHAT in ajax mode that in IFRAME in on the left and i need it to be in right.

I Go throw CSS tpl's put RTL's there but nothing that effect this block...

HELP ME PLEASE !

Navigation

[0] Message Index

Go to full version