diff --git a/src/messenger/webim/images/webimlogo.gif b/src/messenger/webim/images/webimlogo.gif new file mode 100644 index 00000000..edd7d31b Binary files /dev/null and b/src/messenger/webim/images/webimlogo.gif differ diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index 1c52639c..95b3129c 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -277,6 +277,7 @@ function setup_chatview_for_user($thread,$level) { $page['ct.token'] = $thread['ltoken']; $page['ct.user.name'] = topage($thread['userName']); $page['canChangeName'] = $settings['usercanchangename'] == "1"; + $page['chat.title'] = topage($settings['chattitle']); setup_logo(); $page['send_shortcut'] = "Ctrl-Enter"; @@ -298,6 +299,7 @@ function setup_chatview_for_operator($thread,$operator) { $page['ct.chatThreadId'] = $thread['threadid']; $page['ct.token'] = $thread['ltoken']; $page['ct.user.name'] = topage(get_user_name($thread['userName'],$thread['remote'],$thread['userid'])); + $page['chat.title'] = topage($settings['chattitle']); setup_logo(); $page['send_shortcut'] = "Ctrl-Enter"; diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index c1b73674..1b9730af 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -428,13 +428,14 @@ function webim_mail($toaddr, $reply_to, $subject, $body) { $settings = array( 'email' => '', /* inbox for left messages */ - 'title' => 'Company', + 'title' => 'Your Company', 'hosturl' => 'http://webim.sourceforge.net', 'logo' => '', 'enableban' => '0', 'usernamepattern' => '{name}', 'usercanchangename' => '1', - 'chatstyle' => 'default' + 'chatstyle' => 'default', + 'chattitle' => 'Live Support' ); $settingsloaded = false; $settings_in_db = array(); diff --git a/src/messenger/webim/libs/demothread.php b/src/messenger/webim/libs/demothread.php index 28d3b584..a93485c7 100644 --- a/src/messenger/webim/libs/demothread.php +++ b/src/messenger/webim/libs/demothread.php @@ -36,7 +36,7 @@ function demo_process_thread($act,$outformat,$lastid,$isuser,$canpost,$istyping, "\n". "\n". "". - "". + "". " diff --git a/src/messenger/webim/styles/default/error.tpl b/src/messenger/webim/styles/default/error.tpl index 8626bda7..ac0c4204 100644 --- a/src/messenger/webim/styles/default/error.tpl +++ b/src/messenger/webim/styles/default/error.tpl @@ -5,77 +5,65 @@ - + +
" ); } if($lastid == 1) { diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index e5be5b44..3217bfe0 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -256,6 +256,8 @@ page_avatar.intro=You can upload your photo only in JPG, GIF, PNG or TIF image f page_avatar.title=Upload photo page_search.intro=Search for chat history of a specified user or a specified phrase in a message. page_settings.intro=Specify options affecting chat window and common system behavior +settings.chat.title=Title in the chat window +settings.chat.title.description=Department of your company for example. settings.chatstyle=Select style for your chat windows settings.chatstyle.description=Preview for all pages of each style is available here settings.company.title=Company title diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index b4bafe95..56ae076c 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -256,6 +256,8 @@ page_avatar.intro= page_avatar.title=Загрузка фотографии page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. page_settings.intro=Здесь вы можете задать опции влияющие на отображение чат окна и общее поведение системы +settings.chat.title=Заголовок в чат окне +settings.chat.title.description=Например, название отдела вашей компании settings.chatstyle=Выберите вид вашего чат окна settings.chatstyle.description=Предпросмотр всех страниц каждого стиля доступен здесь settings.company.title=Название компании diff --git a/src/messenger/webim/operator/redirect.php b/src/messenger/webim/operator/redirect.php index 07d433c8..6caa252a 100644 --- a/src/messenger/webim/operator/redirect.php +++ b/src/messenger/webim/operator/redirect.php @@ -50,6 +50,7 @@ if( $nextOperator ) { $errors[] = "Unknown operator"; // FIXME } +setup_logo(); if( count($errors) > 0 ) { expand("../styles", getchatstyle(), "error.tpl"); } else { diff --git a/src/messenger/webim/operator/settings.php b/src/messenger/webim/operator/settings.php index a964aa37..71af67a1 100644 --- a/src/messenger/webim/operator/settings.php +++ b/src/messenger/webim/operator/settings.php @@ -54,6 +54,7 @@ $enableban = $settings['enableban']; $usernamepattern = $settings['usernamepattern']; $usercanchangename = $settings['usercanchangename']; $chatstyle = $settings['chatstyle']; +$chattitle = $settings['chattitle']; if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $email = getparam('email'); @@ -63,6 +64,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $enableban = verifyparam("enableban","/^on$/", "") == "on" ? "1" : "0"; $usernamepattern = getparam('usernamepattern'); $usercanchangename = verifyparam("usercanchangename", "/^on$/", "") == "on" ? "1" : "0"; + $chattitle = getparam('chattitle'); $chatstyle = verifyparam("chatstyle","/^\w+$/", $chatstyle); if(!in_array($chatstyle, $stylelist)) { @@ -82,6 +84,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $settings['usernamepattern'] = $usernamepattern; $settings['usercanchangename'] = $usercanchangename; $settings['chatstyle'] = $chatstyle; + $settings['chattitle'] = $chattitle; update_settings(); header("Location: $webimroot/operator/index.php"); exit; @@ -97,6 +100,7 @@ $page['formenableban'] = $enableban == "1"; $page['formusernamepattern'] = topage($usernamepattern); $page['formusercanchangename'] = $usercanchangename == "1"; $page['formchatstyle'] = $chatstyle; +$page['formchattitle'] = topage($chattitle); $page['availableStyles'] = $stylelist; start_html_output(); diff --git a/src/messenger/webim/styles/default/chat.tpl b/src/messenger/webim/styles/default/chat.tpl index 24b9b553..70391484 100644 --- a/src/messenger/webim/styles/default/chat.tpl +++ b/src/messenger/webim/styles/default/chat.tpl @@ -62,16 +62,18 @@ var threadParams = { servl:"${webimroot}/thread.php",wroot:"${webimroot}",freque ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL}
- diff --git a/src/messenger/webim/styles/default/leavemessagesent.tpl b/src/messenger/webim/styles/default/leavemessagesent.tpl index f7c0e6c5..dbcf8821 100644 --- a/src/messenger/webim/styles/default/leavemessagesent.tpl +++ b/src/messenger/webim/styles/default/leavemessagesent.tpl @@ -34,9 +34,11 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL} diff --git a/src/messenger/webim/styles/default/mail.tpl b/src/messenger/webim/styles/default/mail.tpl index 37fcfdaa..61046cc0 100644 --- a/src/messenger/webim/styles/default/mail.tpl +++ b/src/messenger/webim/styles/default/mail.tpl @@ -47,10 +47,12 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} - ${if:webimHost} - ${page:ct.company.name} + ${if:webimHost} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL} @@ -73,7 +75,7 @@ ${endif:errors}
- - - - - - - - - - - - - - - - -
-

${msg:chat.error_page.head}

-
- - - - - - - - - - - -
- - ${errors} - - -
- -
- - - - - - - - - - - - -
- + - -
+ - - - + +
${msg:chat.error_page.close} + ${if:ct.company.chatLogoURL} + ${if:webimHost} + + + + ${else:webimHost} + + ${endif:webimHost} + ${else:ct.company.chatLogoURL} + ${if:webimHost} + ${page:ct.company.name} + ${else:webimHost} + ${page:ct.company.name} + ${endif:webimHost} + ${endif:ct.company.chatLogoURL} + ${msg:chat.error_page.head}
+ + + + + + +

+ ${errors} +

- -
- -
- - + \ No newline at end of file diff --git a/src/messenger/webim/styles/default/leavemessage.tpl b/src/messenger/webim/styles/default/leavemessage.tpl index 821b7ac8..96367982 100644 --- a/src/messenger/webim/styles/default/leavemessage.tpl +++ b/src/messenger/webim/styles/default/leavemessage.tpl @@ -59,9 +59,11 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL}
- + diff --git a/src/messenger/webim/styles/default/mailsent.tpl b/src/messenger/webim/styles/default/mailsent.tpl index 95e2fad2..2260c582 100644 --- a/src/messenger/webim/styles/default/mailsent.tpl +++ b/src/messenger/webim/styles/default/mailsent.tpl @@ -34,9 +34,11 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL} diff --git a/src/messenger/webim/styles/default/nochat.tpl b/src/messenger/webim/styles/default/nochat.tpl index 8347e2d1..2dc491da 100644 --- a/src/messenger/webim/styles/default/nochat.tpl +++ b/src/messenger/webim/styles/default/nochat.tpl @@ -34,9 +34,11 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL} diff --git a/src/messenger/webim/styles/default/redirect.tpl b/src/messenger/webim/styles/default/redirect.tpl index e7720254..c1ba4367 100644 --- a/src/messenger/webim/styles/default/redirect.tpl +++ b/src/messenger/webim/styles/default/redirect.tpl @@ -58,9 +58,11 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL} diff --git a/src/messenger/webim/styles/default/redirected.tpl b/src/messenger/webim/styles/default/redirected.tpl index f9d2f354..fd50f791 100644 --- a/src/messenger/webim/styles/default/redirected.tpl +++ b/src/messenger/webim/styles/default/redirected.tpl @@ -34,9 +34,11 @@ ${endif:webimHost} ${else:ct.company.chatLogoURL} ${if:webimHost} - ${page:ct.company.name} + + + ${else:webimHost} - ${page:ct.company.name} + ${endif:webimHost} ${endif:ct.company.chatLogoURL} diff --git a/src/messenger/webim/view/settings.php b/src/messenger/webim/view/settings.php index 3806d2ee..945f7234 100644 --- a/src/messenger/webim/view/settings.php +++ b/src/messenger/webim/view/settings.php @@ -74,6 +74,10 @@ + +
${msg:mailthread.enter_email}${msg:mailthread.enter_email}
+ +