Author Topic: Patch for using RTL and LTR chat templates at one site  (Read 12939 times)

0 Members and 1 Guest are viewing this topic.

olegp

  • Full Member
  • ***
  • Posts: 8
Patch for using RTL and LTR chat templates at one site
« on: June 09, 2009, 02:41:09 PM »
Hi!

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

1. add to /libs/chat.php function

Code: [Select]
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);
}

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

Code: [Select]
21: $operator = check_login();
put this code here -
Code: [Select]
if (isset($_REQUEST[thread])){
    if (get_user_lang($_REQUEST[thread])=='he'){
        $chatstyle="techheb";
    }else{
        $chatstyle=getchatstyle();
    }
}else{
    $chatstyle=getchatstyle();
}

Code: [Select]
23: loadsettings();
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.
« Last Edit: June 10, 2009, 10:53:44 AM by olegp »

svipic

  • Jr. Member
  • **
  • Posts: 1
Re: Patch for using RTL and LTR chat templates at one site
« Reply #1 on: July 11, 2009, 03:42:36 AM »
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 !