From 88057b15d084452c25927f3e0acf18955bf80913 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Fri, 10 Apr 2009 16:06:20 +0000 Subject: [PATCH] "send message with:" option git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@469 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/libs/common.php | 1 + src/messenger/webim/locales/en/properties | 1 + src/messenger/webim/locales/ru/properties | 1 + src/messenger/webim/operator/settings.php | 4 +++- src/messenger/webim/view/settings.php | 10 ++++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index ea8eb157..68c5e3b4 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -531,6 +531,7 @@ $settings = array( 'email' => '', /* inbox for left messages */ 'left_messages_locale' => $home_locale, + 'sendmessagekey' => 'center', 'enableban' => '0', 'enablessl' => '0', diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index fd001ac7..1c798f75 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -391,6 +391,7 @@ settings.no.title=Please enter your company title settings.onehostconnections.description=0 allows any number of connections settings.onehostconnections=Max number of threads from one address settings.saved=Changes saved +settings.sendmessagekey=Send messages with: settings.survey.askgroup.description=Show/hide department selection field in the survey settings.survey.askgroup=Allows visitor to choose department/group settings.survey.askmail.description=Show/hide email field in the survey diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index 76005570..7690e8f8 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -391,6 +391,7 @@ settings.no.title= settings.onehostconnections.description=0 разрешает любое количество соединений settings.onehostconnections=Максимальное количество диалогов с одного адреса settings.saved=Изменения сохранены +settings.sendmessagekey=Посылать сообщение по: settings.survey.askgroup.description=Показать/спрятать выбор группы в диалоге перед началом чата settings.survey.askgroup=Позволять посетителю выбирать группу операторов settings.survey.askmail.description=Показать/спрятать поле ввода адреса электронной почты diff --git a/src/messenger/webim/operator/settings.php b/src/messenger/webim/operator/settings.php index 37cb776d..11f51f9c 100644 --- a/src/messenger/webim/operator/settings.php +++ b/src/messenger/webim/operator/settings.php @@ -34,7 +34,7 @@ if($handle = opendir($stylesfolder)) { $options = array( 'email', 'title', 'logo', 'hosturl', 'usernamepattern', - 'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'max_connections_from_one_host'); + 'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'max_connections_from_one_host', 'sendmessagekey'); loadsettings(); $params = array(); @@ -52,6 +52,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $params['geolink'] = getparam('geolink'); $params['geolinkparams'] = getparam('geolinkparams'); $params['max_connections_from_one_host'] = trim(getparam('onehostconnections')); + $params['sendmessagekey'] = verifyparam('sendmessagekey', "/^c?enter$/"); $params['chatstyle'] = verifyparam("chatstyle","/^\w+$/", $params['chatstyle']); if(!in_array($params['chatstyle'], $stylelist)) { @@ -94,6 +95,7 @@ $page['formusernamepattern'] = topage($params['usernamepattern']); $page['formchatstyle'] = $params['chatstyle']; $page['formchattitle'] = topage($params['chattitle']); $page['formonehostconnections'] = $params['max_connections_from_one_host']; +$page['formsendmessagekey'] = $params['sendmessagekey']; $page['availableStyles'] = $stylelist; $page['stored'] = isset($_GET['stored']); diff --git a/src/messenger/webim/view/settings.php b/src/messenger/webim/view/settings.php index e12f8d04..d53c8b41 100644 --- a/src/messenger/webim/view/settings.php +++ b/src/messenger/webim/view/settings.php @@ -134,6 +134,16 @@ require_once('inc_errors.php');
+
+
+
+ + +
+
+