diff --git a/src/messenger/webim/libs/config.php b/src/messenger/webim/libs/config.php
index a6ec574d..9bc46d1c 100644
--- a/src/messenger/webim/libs/config.php
+++ b/src/messenger/webim/libs/config.php
@@ -73,11 +73,6 @@ $remote_visitor = 'visitor_from_request';
*/
$online_timeout = 30;
-/*
- * Link to page with information about user, {id} is substituted
- */
-$user_link_pattern = "";
-
/*
* Maximum uploaded file size.
*/
diff --git a/src/messenger/webim/libs/demothread.php b/src/messenger/webim/libs/demothread.php
new file mode 100644
index 00000000..c3eb9fe8
--- /dev/null
+++ b/src/messenger/webim/libs/demothread.php
@@ -0,0 +1,47 @@
+".myiconv($webim_encoding,"utf-8",escape_with_cdata(message_to_html($msg)))."\n";
+}
+
+function demo_process_thread($act,$lastid,$isuser,$canpost) {
+ global $kind_for_agent, $kind_info, $kind_events, $kind_user, $kind_agent;
+ if( $act == "refresh" ) {
+ $lastid++;
+ start_xml_output();
+ print("");
+ if($lastid == 1) {
+ demo_print_message(
+ array('ikind'=>$kind_for_agent,'created'=>time()-15,'tname'=>'',
+ 'tmessage'=>getstring2('chat.came.from',array("http://google.com"))));
+ demo_print_message(
+ array('ikind'=>$kind_info,'created'=>time()-15,'tname'=>'',
+ 'tmessage'=>getstring('chat.wait')));
+ demo_print_message(
+ array('ikind'=>$kind_events,'created'=>time()-10,'tname'=>'',
+ 'tmessage'=>getstring2("chat.status.operator.joined", array("Administrator"))));
+ demo_print_message(
+ array('ikind'=>$kind_agent,'created'=>time()-9,'tname'=>'Administrator',
+ 'tmessage'=>getstring("demo.chat.welcome")));
+ demo_print_message(
+ array('ikind'=>$kind_user,'created'=>time()-5,'tname'=>getstring("chat.default.username"),
+ 'tmessage'=>getstring("demo.chat.question")));
+ }
+ print("");
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties
index c4d093a5..eece8f3a 100644
--- a/src/messenger/webim/locales/en/properties
+++ b/src/messenger/webim/locales/en/properties
@@ -178,6 +178,8 @@ confirm.take.yes=Yes, I'm sure
content.blocked=Here you can defend from malicious visitors.
content.history=Search the dialogs history
content.logoff=Log out of the system.
+demo.chat.question=There are so many browsers to choose from. Which one(s) do you recommend?
+demo.chat.welcome=Hello, how may I help you?
errors.failed.uploading.file=Error uploading file "{0}": "{1}".
errors.file.move.error=Error moving file
errors.file.size.exceeded=Uploaded file size exceeded
@@ -229,6 +231,10 @@ page.gen_button.choose_image=Choose image
page.gen_button.choose_locale=Target locale
page.gen_button.include_site_name=Include host name into code
page.gen_button.secure_links=Use secure links (https)
+page.preview.choose=Choose style
+page.preview.intro=You can preview styles for your site
+page.preview.title=Site style
+page.preview.userchat=Chat window (user-mode)
page_agent.create_new=Here you can create new operator
page_agent.tab.avatar=Photo
page_agent.tab.main=General
diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties
index a0544403..65134288 100644
--- a/src/messenger/webim/locales/ru/properties
+++ b/src/messenger/webim/locales/ru/properties
@@ -178,6 +178,8 @@ confirm.take.yes=
content.blocked=Здесь можно защищаться от спама и вредных посетителей
content.history=Поиск по истории диалогов
content.logoff=Покинуть систему.
+demo.chat.question=Посоветуйте мне, пожалуйста, хороший браузер?
+demo.chat.welcome=Здравствуйте! Чем я могу Вам помочь?
errors.failed.uploading.file=Ошибка выгрузки файла "{0}": "{1}".
errors.file.move.error=Ошибка копирования файла
errors.file.size.exceeded=Превышен допустимый размер файла
@@ -229,6 +231,10 @@ page.gen_button.choose_image=
page.gen_button.choose_locale=Для какой локали создавать кнопку
page.gen_button.include_site_name=Включать имя сайта в код
page.gen_button.secure_links=Использовать защищенное соединение (https)
+page.preview.choose=Выберите стиль
+page.preview.intro=Здесь вы можете посмотреть на стиль вашего сайта
+page.preview.title=Стиль мессенджера
+page.preview.userchat=Chat window (user-mode)
page_agent.create_new=Создание нового оператора
page_agent.tab.avatar=Фотография
page_agent.tab.main=Общее
diff --git a/src/messenger/webim/operator/preview.php b/src/messenger/webim/operator/preview.php
new file mode 100644
index 00000000..698c5099
--- /dev/null
+++ b/src/messenger/webim/operator/preview.php
@@ -0,0 +1,53 @@
+ 0,'userName' => getstring("chat.default.username"), 'ltoken' => 123), "ajaxed");
+ expand("../design/$preview/chat.tpl");
+ exit;
+}
+
+$page['formpreview'] = $preview;
+$page['availablePreviews'] = $designlist;
+$page['operator'] = topage(get_operator_name($operator));
+$page['showlink'] = "$webimroot/operator/preview.php?preview=$preview&show=";
+
+start_html_output();
+require('../view/preview.php');
+?>
\ No newline at end of file
diff --git a/src/messenger/webim/thread.php b/src/messenger/webim/thread.php
index 6803916b..6c1974db 100644
--- a/src/messenger/webim/thread.php
+++ b/src/messenger/webim/thread.php
@@ -23,6 +23,13 @@ $isuser = verifyparam( "user", "/^true$/", "false") == 'true';
$outformat = ((verifyparam( "html", "/^on$/", "off") == 'on') ? "html" : "xml");
$istyping = verifyparam( "typed", "/^1$/", "") == '1';
+if($threadid == 0 && ($token == 123 || $token == 124)) {
+ require_once('libs/demothread.php');
+ $lastid = verifyparam( "lastid", "/^\d{1,9}$/", 0);
+ demo_process_thread($act,$lastid,$isuser,$token == 123);
+ exit;
+}
+
$thread = thread_by_id($threadid);
if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) {
die("wrong thread");
diff --git a/src/messenger/webim/view/preview.php b/src/messenger/webim/view/preview.php
new file mode 100644
index 00000000..61a2e179
--- /dev/null
+++ b/src/messenger/webim/view/preview.php
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+">
+">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+