From 55d67ed90555a0213b79391199a917a7c9544a00 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Sat, 8 Nov 2008 00:44:20 +0000 Subject: [PATCH] chat title, fix demothread git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@192 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/images/webimlogo.gif | Bin 0 -> 2270 bytes src/messenger/webim/libs/chat.php | 2 + src/messenger/webim/libs/common.php | 5 +- src/messenger/webim/libs/demothread.php | 2 +- src/messenger/webim/locales/en/properties | 2 + src/messenger/webim/locales/ru/properties | 2 + src/messenger/webim/operator/redirect.php | 1 + src/messenger/webim/operator/settings.php | 4 + src/messenger/webim/styles/default/chat.tpl | 14 ++- src/messenger/webim/styles/default/error.tpl | 118 ++++++++---------- .../webim/styles/default/leavemessage.tpl | 6 +- .../webim/styles/default/leavemessagesent.tpl | 6 +- src/messenger/webim/styles/default/mail.tpl | 10 +- .../webim/styles/default/mailsent.tpl | 6 +- src/messenger/webim/styles/default/nochat.tpl | 6 +- .../webim/styles/default/redirect.tpl | 6 +- .../webim/styles/default/redirected.tpl | 6 +- src/messenger/webim/view/settings.php | 4 + 18 files changed, 113 insertions(+), 87 deletions(-) create mode 100644 src/messenger/webim/images/webimlogo.gif diff --git a/src/messenger/webim/images/webimlogo.gif b/src/messenger/webim/images/webimlogo.gif new file mode 100644 index 0000000000000000000000000000000000000000..edd7d31b3632d3f6d69247d7dfb22a7b3ccfc439 GIT binary patch literal 2270 zcmW+#dpuNm8~+uW>CLqp!l)+NymssDG~+T8dF5KsJuM%b+tN7)fCSh2a#2 zQ5XUw3Xv2dD1=i8qYxB;4bXrE%P@^-9{Ld^iIXHol8B~-iXcb=Ckc!s5Um25I6>k# ziDM*=Xi+eW5hR9_7)D|UG{P#02om8W!bk+Hpc=qHG^hkw&;w$?257*7WkegIYj`+8 zU<83^e?SWrjuSXW;E1*hDxits1cnh90{0*aW(kB72qO^KgFHYcY(pI2A4GsdPz_)p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Zue#TUITIb z<^#q~BR5;0Xt2%&Y-WtQySiA-H+SE@f6KQ>aeVg3X5oIbS?UbOwacGgbkcTnSW@Vc zo+976Fjb;%D;EE}G;(#{lf8^nDUuy|Prda5*_#_yw!~BnWp8-o=5S_Db?D8N=l*Yy zH(v3`a_32b`Dur@P2BJ!KYx0i>EiT_INNjmD@zeN{7tkyv8_1 z$7<#!w#jt9#LJ=ne0*b_S^ZSQyj3>F-d9HomHHp1kL>k~Py}991s8g}IHk8bJm2)b zplSVVCTideuWj~obG69RvD+2B>-Oa{x>+ILTeDXFKHK<0l '', /* 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}
+ +