Added invitations styles
@ -93,7 +93,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
|||||||
$page = array();
|
$page = array();
|
||||||
setup_logo();
|
setup_logo();
|
||||||
setup_leavemessage($visitor['name'],$email,$firstmessage,$groupid,$groupname,$info,$referrer,can_show_captcha());
|
setup_leavemessage($visitor['name'],$email,$firstmessage,$groupid,$groupname,$info,$referrer,can_show_captcha());
|
||||||
expand("styles", getchatstyle(), "leavemessage.tpl");
|
expand("styles/dialogs", getchatstyle(), "leavemessage.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
|||||||
$page = array();
|
$page = array();
|
||||||
setup_logo();
|
setup_logo();
|
||||||
setup_survey($visitor['name'], $email, $groupid, $info, $referrer);
|
setup_survey($visitor['name'], $email, $groupid, $info, $referrer);
|
||||||
expand("styles", getchatstyle(), "survey.tpl");
|
expand("styles/dialogs", getchatstyle(), "survey.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,13 +160,13 @@ setup_chatview_for_user($thread, $level);
|
|||||||
|
|
||||||
$pparam = verifyparam( "act", "/^(mailthread)$/", "default");
|
$pparam = verifyparam( "act", "/^(mailthread)$/", "default");
|
||||||
if( $pparam == "mailthread" ) {
|
if( $pparam == "mailthread" ) {
|
||||||
expand("styles", getchatstyle(), "mail.tpl");
|
expand("styles/dialogs", getchatstyle(), "mail.tpl");
|
||||||
} else if( $level == "ajaxed" ) {
|
} else if( $level == "ajaxed" ) {
|
||||||
expand("styles", getchatstyle(), "chat.tpl");
|
expand("styles/dialogs", getchatstyle(), "chat.tpl");
|
||||||
} else if( $level == "simple" ) {
|
} else if( $level == "simple" ) {
|
||||||
expand("styles", getchatstyle(), "chatsimple.tpl");
|
expand("styles/dialogs", getchatstyle(), "chatsimple.tpl");
|
||||||
} else if( $level == "old" ) {
|
} else if( $level == "old" ) {
|
||||||
expand("styles", getchatstyle(), "nochat.tpl");
|
expand("styles/dialogs", getchatstyle(), "nochat.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of Mibew Messenger project.
|
|
||||||
|
|
||||||
Copyright (c) 2005-2011 Mibew Messenger Community
|
|
||||||
All rights reserved. The contents of this file are subject to the terms of
|
|
||||||
the Eclipse Public License v1.0 which accompanies this distribution, and
|
|
||||||
is available at http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
|
|
||||||
Alternatively, the contents of this file may be used under the terms of
|
|
||||||
the GNU General Public License Version 2 or later (the "GPL"), in which case
|
|
||||||
the provisions of the GPL are applicable instead of those above. If you wish
|
|
||||||
to allow use of your version of this file only under the terms of the GPL, and
|
|
||||||
not to allow others to use your version of this file under the terms of the
|
|
||||||
EPL, indicate your decision by deleting the provisions above and replace them
|
|
||||||
with the notice and other provisions required by the GPL.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#mibewinvitationpopup {
|
|
||||||
border: 1px solid #aaa;
|
|
||||||
background-color: #ddd;
|
|
||||||
padding: 5px;
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 0;
|
|
||||||
width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationpopup h1, #mibewinvitationpopup p, #mibewinvitationclose a {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationclose {
|
|
||||||
float: right;
|
|
||||||
background-color: red;
|
|
||||||
padding: 1px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationclose a {
|
|
||||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: white;
|
|
||||||
margin: 0 4px 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationclose a, #mibewinvitationclose a:link, #mibewinvitationclose a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationpopup h1 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationpopup p {
|
|
||||||
padding: 2px;
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mibewinvitationavatar {
|
|
||||||
margin: 2px;
|
|
||||||
margin-right: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
float: left;
|
|
||||||
}
|
|
@ -95,7 +95,7 @@ if($settings["enablecaptcha"] == "1" && can_show_captcha()) {
|
|||||||
if( count($errors) > 0 ) {
|
if( count($errors) > 0 ) {
|
||||||
setup_leavemessage($visitor_name,$email,$message,$groupid,$groupname,$info,$referrer,can_show_captcha());
|
setup_leavemessage($visitor_name,$email,$message,$groupid,$groupname,$info,$referrer,can_show_captcha());
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("styles", getchatstyle(), "leavemessage.tpl");
|
expand("styles/dialogs", getchatstyle(), "leavemessage.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,5 +122,5 @@ if($inbox_mail) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("styles", getchatstyle(), "leavemessagesent.tpl");
|
expand("styles/dialogs", getchatstyle(), "leavemessagesent.tpl");
|
||||||
?>
|
?>
|
@ -55,7 +55,7 @@ function expand_var($matches)
|
|||||||
} else if ($var == 'jsver') {
|
} else if ($var == 'jsver') {
|
||||||
return $jsver;
|
return $jsver;
|
||||||
} else if ($var == 'tplroot') {
|
} else if ($var == 'tplroot') {
|
||||||
return "$webimroot/styles/$current_style";
|
return "$webimroot/styles/dialogs/$current_style";
|
||||||
} else if ($var == 'styleid') {
|
} else if ($var == 'styleid') {
|
||||||
return $current_style;
|
return $current_style;
|
||||||
} else if ($var == 'pagination') {
|
} else if ($var == 'pagination') {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* Evgeny Gryaznov - initial API and implementation
|
* Evgeny Gryaznov - initial API and implementation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function generate_button($title, $locale, $style, $group, $inner, $showhost, $forcesecure, $modsecurity)
|
function generate_button($title, $locale, $style, $invitationstyle, $group, $inner, $showhost, $forcesecure, $modsecurity)
|
||||||
{
|
{
|
||||||
global $settings;
|
global $settings;
|
||||||
$link = get_app_location($showhost, $forcesecure) . "/client.php";
|
$link = get_app_location($showhost, $forcesecure) . "/client.php";
|
||||||
@ -38,6 +38,8 @@ function generate_button($title, $locale, $style, $group, $inner, $showhost, $fo
|
|||||||
$temp = preg_replace('/^(<a )/', '\1id="mibewAgentButton" ', $temp);
|
$temp = preg_replace('/^(<a )/', '\1id="mibewAgentButton" ', $temp);
|
||||||
$temp .= '<div id="mibewinvitation"></div><script type="text/javascript">var mibewInviteStyle = \'@import url(';
|
$temp .= '<div id="mibewinvitation"></div><script type="text/javascript">var mibewInviteStyle = \'@import url(';
|
||||||
$temp .= get_app_location($showhost, $forcesecure);
|
$temp .= get_app_location($showhost, $forcesecure);
|
||||||
|
$temp .= '/styles/invitations/';
|
||||||
|
$temp .= ($invitationstyle?$invitationstyle:$settings['invitationstyle']);
|
||||||
$temp .= '/invite.css);\'; var mibewRequestTimeout = ';
|
$temp .= '/invite.css);\'; var mibewRequestTimeout = ';
|
||||||
$temp .= $settings['updatefrequency_tracking'];
|
$temp .= $settings['updatefrequency_tracking'];
|
||||||
$temp .= '*1000; var mibewRequestUrl = \'';
|
$temp .= '*1000; var mibewRequestUrl = \'';
|
||||||
@ -49,20 +51,6 @@ function generate_button($title, $locale, $style, $group, $inner, $showhost, $fo
|
|||||||
return "<!-- mibew button -->" . $temp . "<!-- / mibew button -->";
|
return "<!-- mibew button -->" . $temp . "<!-- / mibew button -->";
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_style_list($stylesfolder)
|
|
||||||
{
|
|
||||||
$stylelist = array("" => getlocal("page.preview.style_default"));
|
|
||||||
if ($handle = opendir($stylesfolder)) {
|
|
||||||
while (false !== ($file = readdir($handle))) {
|
|
||||||
if (preg_match("/^\w+$/", $file) && is_dir("$stylesfolder/$file")) {
|
|
||||||
$stylelist[$file] = $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
return $stylelist;
|
|
||||||
}
|
|
||||||
|
|
||||||
function verifyparam_groupid($paramid)
|
function verifyparam_groupid($paramid)
|
||||||
{
|
{
|
||||||
global $settings, $errors;
|
global $settings, $errors;
|
||||||
|
@ -36,13 +36,16 @@ function update_settings()
|
|||||||
|
|
||||||
function setup_settings_tabs($active)
|
function setup_settings_tabs($active)
|
||||||
{
|
{
|
||||||
global $page, $webimroot;
|
global $settings, $page, $webimroot;
|
||||||
$page['tabs'] = array(
|
$page['tabs'] = array(
|
||||||
getlocal("page_settings.tab.main") => $active != 0 ? "$webimroot/operator/settings.php" : "",
|
getlocal("page_settings.tab.main") => $active != 0 ? "$webimroot/operator/settings.php" : "",
|
||||||
getlocal("page_settings.tab.features") => $active != 1 ? "$webimroot/operator/features.php" : "",
|
getlocal("page_settings.tab.features") => $active != 1 ? "$webimroot/operator/features.php" : "",
|
||||||
getlocal("page_settings.tab.performance") => $active != 2 ? "$webimroot/operator/performance.php" : "",
|
getlocal("page_settings.tab.performance") => $active != 2 ? "$webimroot/operator/performance.php" : "",
|
||||||
getlocal("page_settings.tab.themes") => $active != 3 ? "$webimroot/operator/themes.php" : "",
|
getlocal("page_settings.tab.themes") => $active != 3 ? "$webimroot/operator/themes.php" : "",
|
||||||
);
|
);
|
||||||
|
if ($settings['enabletracking']) {
|
||||||
|
$page['tabs'][getlocal("page_settings.tab.invitationthemes")] = ($active != 4 ? "$webimroot/operator/invitationthemes.php" : "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
36
src/messenger/webim/libs/styles.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* This file is part of Mibew Messenger project.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2005-2011 Mibew Messenger Community
|
||||||
|
* All rights reserved. The contents of this file are subject to the terms of
|
||||||
|
* the Eclipse Public License v1.0 which accompanies this distribution, and
|
||||||
|
* is available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* the GNU General Public License Version 2 or later (the "GPL"), in which case
|
||||||
|
* the provisions of the GPL are applicable instead of those above. If you wish
|
||||||
|
* to allow use of your version of this file only under the terms of the GPL, and
|
||||||
|
* not to allow others to use your version of this file under the terms of the
|
||||||
|
* EPL, indicate your decision by deleting the provisions above and replace them
|
||||||
|
* with the notice and other provisions required by the GPL.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Evgeny Gryaznov - initial API and implementation
|
||||||
|
*/
|
||||||
|
|
||||||
|
function get_style_list($stylesfolder)
|
||||||
|
{
|
||||||
|
$stylelist = array();
|
||||||
|
if ($handle = opendir($stylesfolder)) {
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
if (preg_match("/^\w+$/", $file) && is_dir("$stylesfolder/$file")) {
|
||||||
|
$stylelist[$file] = $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
return $stylelist;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -265,6 +265,7 @@ page.chat.old_browser.problem=<p>Your web browser is not fully supported. \nPlea
|
|||||||
page.chat.old_browser.title=Please use a more recent browser
|
page.chat.old_browser.title=Please use a more recent browser
|
||||||
page.gen_button.choose_group=Code for group
|
page.gen_button.choose_group=Code for group
|
||||||
page.gen_button.choose_image=Choose image
|
page.gen_button.choose_image=Choose image
|
||||||
|
page.gen_button.choose_invitationstyle=Invitation style
|
||||||
page.gen_button.choose_locale=Code for language
|
page.gen_button.choose_locale=Code for language
|
||||||
page.gen_button.choose_style=Chat window style
|
page.gen_button.choose_style=Chat window style
|
||||||
page.gen_button.code.description=<strong>Caution!</strong> Please don't change<br/> the code manually because<br/> we don't guarantee that<br/> it will work!
|
page.gen_button.code.description=<strong>Caution!</strong> Please don't change<br/> the code manually because<br/> we don't guarantee that<br/> it will work!
|
||||||
@ -361,7 +362,8 @@ page_settings.intro=Specify options affecting chat window and common system beha
|
|||||||
page_settings.tab.features=Optional Services
|
page_settings.tab.features=Optional Services
|
||||||
page_settings.tab.main=General
|
page_settings.tab.main=General
|
||||||
page_settings.tab.performance=Performance
|
page_settings.tab.performance=Performance
|
||||||
page_settings.tab.themes=Themes preview
|
page_settings.tab.themes=Chat themes preview
|
||||||
|
page_settings.tab.invitationthemes=Invitation themes preview
|
||||||
pending.menu.hide=Hide menu >>
|
pending.menu.hide=Hide menu >>
|
||||||
pending.menu.show=Show menu >>
|
pending.menu.show=Show menu >>
|
||||||
pending.popup_notification=A new visitor is waiting for an answer.
|
pending.popup_notification=A new visitor is waiting for an answer.
|
||||||
@ -467,8 +469,10 @@ settings.host.description=Destination for your company name or logo link
|
|||||||
settings.host=URL of your website
|
settings.host=URL of your website
|
||||||
settings.invitationlifetime.description=Specify the lifetime of invitation in seconds. Default is 60 seconds.
|
settings.invitationlifetime.description=Specify the lifetime of invitation in seconds. Default is 60 seconds.
|
||||||
settings.invitationlifetime=Invitation lifetime
|
settings.invitationlifetime=Invitation lifetime
|
||||||
|
settings.invitationstyle.description=A preview for invitation style is available <a href="invitationthemes.php">here</a>
|
||||||
|
settings.invitationstyle=Select a style for your invitation
|
||||||
settings.leavemessage_captcha.description=Protection against automated spam (captcha)
|
settings.leavemessage_captcha.description=Protection against automated spam (captcha)
|
||||||
settings.leavemessage_captcha=Force visitor to enter a verification code when leaving message
|
settings.leavemessage_captcha=Force visitorOD to enter a verification code when leaving message
|
||||||
settings.logo.description=Enter http address of your company logo
|
settings.logo.description=Enter http address of your company logo
|
||||||
settings.logo=Your company logo
|
settings.logo=Your company logo
|
||||||
settings.no.title=Please enter your company title
|
settings.no.title=Please enter your company title
|
||||||
|
@ -263,6 +263,7 @@ page.chat.old_browser.problem=<p>
|
|||||||
page.chat.old_browser.title=Используйте более новый browser
|
page.chat.old_browser.title=Используйте более новый browser
|
||||||
page.gen_button.choose_group=Для группы
|
page.gen_button.choose_group=Для группы
|
||||||
page.gen_button.choose_image=Выбор картинки
|
page.gen_button.choose_image=Выбор картинки
|
||||||
|
page.gen_button.choose_invitationstyle=Ñòèëü ïðèãëàøåíèÿ
|
||||||
page.gen_button.choose_locale=Для какой локали создавать кнопку
|
page.gen_button.choose_locale=Для какой локали создавать кнопку
|
||||||
page.gen_button.choose_style=Стиль чат-окна
|
page.gen_button.choose_style=Стиль чат-окна
|
||||||
page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется!
|
page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется!
|
||||||
@ -359,7 +360,8 @@ page_settings.intro=
|
|||||||
page_settings.tab.features=Расширения
|
page_settings.tab.features=Расширения
|
||||||
page_settings.tab.main=Общее
|
page_settings.tab.main=Общее
|
||||||
page_settings.tab.performance=Производительность
|
page_settings.tab.performance=Производительность
|
||||||
page_settings.tab.themes=Ïðîñìîòð ñòèëåé
|
page_settings.tab.themes=Ïðîñìîòð ñòèëåé äèàëîãîâ
|
||||||
|
page_settings.tab.invitationthemes=Ïðîñìîòð ñòèëåé ïðèãëàøåíèé
|
||||||
pending.menu.hide=Спрятать меню >>
|
pending.menu.hide=Спрятать меню >>
|
||||||
pending.menu.show=Показать меню >>
|
pending.menu.show=Показать меню >>
|
||||||
pending.popup_notification=Новый посетитель ожидает ответа.
|
pending.popup_notification=Новый посетитель ожидает ответа.
|
||||||
@ -457,6 +459,8 @@ settings.host.description=
|
|||||||
settings.host=Ссылка на ваш веб сайт
|
settings.host=Ссылка на ваш веб сайт
|
||||||
settings.invitationlifetime.description=Укажите срок действия приглашения к диалогу в секундах. По умолчанию, 60 секунд.
|
settings.invitationlifetime.description=Укажите срок действия приглашения к диалогу в секундах. По умолчанию, 60 секунд.
|
||||||
settings.invitationlifetime=Срок действия приглашения
|
settings.invitationlifetime=Срок действия приглашения
|
||||||
|
settings.invitationstyle.description=Ïðåäïðîñìîòð ñòèëÿ ïðèãëàøåíèÿ äîñòóïåí <a href="invitationthemes.php">çäåñü</a>
|
||||||
|
settings.invitationstyle=Âûáåðèòå âèä ïðèãëàøåíèÿ
|
||||||
settings.leavemessage_captcha.description=Защита от автоматизированного спама (captcha)
|
settings.leavemessage_captcha.description=Защита от автоматизированного спама (captcha)
|
||||||
settings.leavemessage_captcha=Разрешать оставлять сообщение только после ввода специального кода с картинки
|
settings.leavemessage_captcha=Разрешать оставлять сообщение только после ввода специального кода с картинки
|
||||||
settings.logo.description=Введите ссылку на логотип компании
|
settings.logo.description=Введите ссылку на логотип компании
|
||||||
|
@ -50,7 +50,7 @@ if( count($errors) > 0 ) {
|
|||||||
$page['ct.token'] = $thread['ltoken'];
|
$page['ct.token'] = $thread['ltoken'];
|
||||||
$page['level'] = "";
|
$page['level'] = "";
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("styles", getchatstyle(), "mail.tpl");
|
expand("styles/dialogs", getchatstyle(), "mail.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,6 +69,6 @@ webim_mail($email, $webim_mailbox, $subject, $body, $link);
|
|||||||
close_connection($link);
|
close_connection($link);
|
||||||
|
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("styles", getchatstyle(), "mailsent.tpl");
|
expand("styles/dialogs", getchatstyle(), "mailsent.tpl");
|
||||||
exit;
|
exit;
|
||||||
?>
|
?>
|
@ -63,7 +63,7 @@ if (!isset($_GET['token'])) {
|
|||||||
if (!is_capable($can_takeover, $operator)) {
|
if (!is_capable($can_takeover, $operator)) {
|
||||||
$errors = array("Cannot take over");
|
$errors = array("Cannot take over");
|
||||||
start_html_output();
|
start_html_output();
|
||||||
expand("../styles", getchatstyle(), "error.tpl");
|
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ if (!isset($_GET['token'])) {
|
|||||||
} else if (!is_capable($can_viewthreads, $operator)) {
|
} else if (!is_capable($can_viewthreads, $operator)) {
|
||||||
$errors = array("Cannot view threads");
|
$errors = array("Cannot view threads");
|
||||||
start_html_output();
|
start_html_output();
|
||||||
expand("../styles", getchatstyle(), "error.tpl");
|
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ if (!$thread || !isset($thread['ltoken']) || $token != $thread['ltoken']) {
|
|||||||
if ($thread['agentId'] != $operator['operatorid'] && !is_capable($can_viewthreads, $operator)) {
|
if ($thread['agentId'] != $operator['operatorid'] && !is_capable($can_viewthreads, $operator)) {
|
||||||
$errors = array("Cannot view threads");
|
$errors = array("Cannot view threads");
|
||||||
start_html_output();
|
start_html_output();
|
||||||
expand("../styles", getchatstyle(), "error.tpl");
|
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,9 +112,9 @@ start_html_output();
|
|||||||
$pparam = verifyparam("act", "/^(redirect)$/", "default");
|
$pparam = verifyparam("act", "/^(redirect)$/", "default");
|
||||||
if ($pparam == "redirect") {
|
if ($pparam == "redirect") {
|
||||||
setup_redirect_links($threadid, $token);
|
setup_redirect_links($threadid, $token);
|
||||||
expand("../styles", getchatstyle(), "redirect.tpl");
|
expand("../styles/dialogs", getchatstyle(), "redirect.tpl");
|
||||||
} else {
|
} else {
|
||||||
expand("../styles", getchatstyle(), "chat.tpl");
|
expand("../styles/dialogs", getchatstyle(), "chat.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -23,6 +23,7 @@ require_once('../libs/common.php');
|
|||||||
require_once('../libs/operator.php');
|
require_once('../libs/operator.php');
|
||||||
require_once('../libs/groups.php');
|
require_once('../libs/groups.php');
|
||||||
require_once('../libs/getcode.php');
|
require_once('../libs/getcode.php');
|
||||||
|
require_once('../libs/styles.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
force_password($operator);
|
force_password($operator);
|
||||||
@ -38,12 +39,20 @@ if (!isset($imageLocales[$image])) {
|
|||||||
}
|
}
|
||||||
$image_locales = $imageLocales[$image];
|
$image_locales = $imageLocales[$image];
|
||||||
|
|
||||||
$stylelist = get_style_list("../styles");
|
$stylelist = get_style_list("../styles/dialogs");
|
||||||
|
$stylelist[""] = getlocal("page.preview.style_default");
|
||||||
$style = verifyparam("style", "/^\w*$/", "");
|
$style = verifyparam("style", "/^\w*$/", "");
|
||||||
if ($style && !in_array($style, $stylelist)) {
|
if ($style && !in_array($style, $stylelist)) {
|
||||||
$style = "";
|
$style = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$invitationstylelist = get_style_list("../styles/invitations");
|
||||||
|
$invitationstylelist[""] = getlocal("page.preview.style_default");
|
||||||
|
$invitationstyle = verifyparam("invitationstyle", "/^\w*$/", "");
|
||||||
|
if ($invitationstyle && !in_array($invitationstyle, $invitationstylelist)) {
|
||||||
|
$invitationstyle = "";
|
||||||
|
}
|
||||||
|
|
||||||
$groupid = verifyparam_groupid("group");
|
$groupid = verifyparam_groupid("group");
|
||||||
$showhost = verifyparam("hostname", "/^on$/", "") == "on";
|
$showhost = verifyparam("hostname", "/^on$/", "") == "on";
|
||||||
$forcesecure = verifyparam("secure", "/^on$/", "") == "on";
|
$forcesecure = verifyparam("secure", "/^on$/", "") == "on";
|
||||||
@ -63,20 +72,24 @@ if ($groupid) {
|
|||||||
$message = get_image($imagehref, $size[0], $size[1]);
|
$message = get_image($imagehref, $size[0], $size[1]);
|
||||||
|
|
||||||
$page = array();
|
$page = array();
|
||||||
$page['buttonCode'] = generate_button("", $lang, $style, $groupid, $message, $showhost, $forcesecure, $modsecurity);
|
$page['buttonCode'] = generate_button("", $lang, $style, $invitationstyle, $groupid, $message, $showhost, $forcesecure, $modsecurity);
|
||||||
$page['availableImages'] = array_keys($imageLocales);
|
$page['availableImages'] = array_keys($imageLocales);
|
||||||
$page['availableLocales'] = $image_locales;
|
$page['availableLocales'] = $image_locales;
|
||||||
$page['availableStyles'] = $stylelist;
|
$page['availableChatStyles'] = $stylelist;
|
||||||
|
$page['availableInvitationStyles'] = $invitationstylelist;
|
||||||
$page['groups'] = get_groups_list();
|
$page['groups'] = get_groups_list();
|
||||||
|
|
||||||
$page['formgroup'] = $groupid;
|
$page['formgroup'] = $groupid;
|
||||||
$page['formstyle'] = $style;
|
$page['formstyle'] = $style;
|
||||||
|
$page['forminvitationstyle'] = $invitationstyle;
|
||||||
$page['formimage'] = $image;
|
$page['formimage'] = $image;
|
||||||
$page['formlang'] = $lang;
|
$page['formlang'] = $lang;
|
||||||
$page['formhostname'] = $showhost;
|
$page['formhostname'] = $showhost;
|
||||||
$page['formsecure'] = $forcesecure;
|
$page['formsecure'] = $forcesecure;
|
||||||
$page['formmodsecurity'] = $modsecurity;
|
$page['formmodsecurity'] = $modsecurity;
|
||||||
|
|
||||||
|
$page['enabletracking'] = $settings['enabletracking'];
|
||||||
|
|
||||||
prepare_menu($operator);
|
prepare_menu($operator);
|
||||||
start_html_output();
|
start_html_output();
|
||||||
require('../view/gen_button.php');
|
require('../view/gen_button.php');
|
||||||
|
48
src/messenger/webim/operator/invitationthemes.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* This file is part of Mibew Messenger project.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2005-2011 Mibew Messenger Community
|
||||||
|
* All rights reserved. The contents of this file are subject to the terms of
|
||||||
|
* the Eclipse Public License v1.0 which accompanies this distribution, and
|
||||||
|
* is available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* the GNU General Public License Version 2 or later (the "GPL"), in which case
|
||||||
|
* the provisions of the GPL are applicable instead of those above. If you wish
|
||||||
|
* to allow use of your version of this file only under the terms of the GPL, and
|
||||||
|
* not to allow others to use your version of this file under the terms of the
|
||||||
|
* EPL, indicate your decision by deleting the provisions above and replace them
|
||||||
|
* with the notice and other provisions required by the GPL.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Evgeny Gryaznov - initial API and implementation
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once('../libs/common.php');
|
||||||
|
require_once('../libs/pagination.php');
|
||||||
|
require_once('../libs/operator.php');
|
||||||
|
require_once('../libs/groups.php');
|
||||||
|
require_once('../libs/expand.php');
|
||||||
|
require_once('../libs/settings.php');
|
||||||
|
require_once('../libs/styles.php');
|
||||||
|
|
||||||
|
$operator = check_login();
|
||||||
|
|
||||||
|
$stylelist = get_style_list("../styles/invitations");
|
||||||
|
|
||||||
|
$preview = verifyparam("preview", "/^\w+$/", "default");
|
||||||
|
if (!in_array($preview, $stylelist)) {
|
||||||
|
$preview = $stylelist[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$page['formpreview'] = $preview;
|
||||||
|
$page['preview'] = $preview;
|
||||||
|
$page['availablePreviews'] = $stylelist;
|
||||||
|
$page['operatorName'] = (empty($operator['vclocalname'])?$operator['vccommonname']:$operator['vclocalname']);
|
||||||
|
|
||||||
|
prepare_menu($operator);
|
||||||
|
start_html_output();
|
||||||
|
setup_settings_tabs(4);
|
||||||
|
require('../view/invitation_themes.php');
|
||||||
|
?>
|
@ -88,9 +88,9 @@ if (isset($_GET['nextGroup'])) {
|
|||||||
|
|
||||||
setup_logo();
|
setup_logo();
|
||||||
if (count($errors) > 0) {
|
if (count($errors) > 0) {
|
||||||
expand("../styles", getchatstyle(), "error.tpl");
|
expand("../styles/dialogs", getchatstyle(), "error.tpl");
|
||||||
} else {
|
} else {
|
||||||
expand("../styles", getchatstyle(), "redirected.tpl");
|
expand("../styles/dialogs", getchatstyle(), "redirected.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -22,6 +22,7 @@
|
|||||||
require_once('../libs/common.php');
|
require_once('../libs/common.php');
|
||||||
require_once('../libs/operator.php');
|
require_once('../libs/operator.php');
|
||||||
require_once('../libs/settings.php');
|
require_once('../libs/settings.php');
|
||||||
|
require_once('../libs/styles.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
force_password($operator);
|
force_password($operator);
|
||||||
@ -29,22 +30,19 @@ force_password($operator);
|
|||||||
$page = array('agentId' => '');
|
$page = array('agentId' => '');
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
$stylelist = array();
|
$stylelist = get_style_list("../styles/dialogs");
|
||||||
$stylesfolder = "../styles";
|
|
||||||
if ($handle = opendir($stylesfolder)) {
|
|
||||||
while (false !== ($file = readdir($handle))) {
|
|
||||||
if (preg_match("/^\w+$/", $file) && is_dir("$stylesfolder/$file")) {
|
|
||||||
$stylelist[] = $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
'email', 'title', 'logo', 'hosturl', 'usernamepattern',
|
'email', 'title', 'logo', 'hosturl', 'usernamepattern',
|
||||||
'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'sendmessagekey');
|
'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'sendmessagekey');
|
||||||
|
|
||||||
loadsettings();
|
loadsettings();
|
||||||
|
|
||||||
|
if ($settings['enabletracking']) {
|
||||||
|
$options[] = 'invitationstyle';
|
||||||
|
$invitationstylelist = get_style_list("../styles/invitations");
|
||||||
|
}
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
foreach ($options as $opt) {
|
foreach ($options as $opt) {
|
||||||
$params[$opt] = $settings[$opt];
|
$params[$opt] = $settings[$opt];
|
||||||
@ -66,6 +64,13 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
|
|||||||
$params['chatstyle'] = $stylelist[0];
|
$params['chatstyle'] = $stylelist[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($settings['enabletracking']) {
|
||||||
|
$params['invitationstyle'] = verifyparam("invitationstyle", "/^\w+$/", $params['invitationstyle']);
|
||||||
|
if (!in_array($params['invitationstyle'], $invitationstylelist)) {
|
||||||
|
$params['invitationstyle'] = $invitationstylelist[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($params['email'] && !is_valid_email($params['email'])) {
|
if ($params['email'] && !is_valid_email($params['email'])) {
|
||||||
$errors[] = getlocal("settings.wrong.email");
|
$errors[] = getlocal("settings.wrong.email");
|
||||||
}
|
}
|
||||||
@ -98,8 +103,14 @@ $page['formusernamepattern'] = topage($params['usernamepattern']);
|
|||||||
$page['formchatstyle'] = $params['chatstyle'];
|
$page['formchatstyle'] = $params['chatstyle'];
|
||||||
$page['formchattitle'] = topage($params['chattitle']);
|
$page['formchattitle'] = topage($params['chattitle']);
|
||||||
$page['formsendmessagekey'] = $params['sendmessagekey'];
|
$page['formsendmessagekey'] = $params['sendmessagekey'];
|
||||||
$page['availableStyles'] = $stylelist;
|
$page['availableChatStyles'] = $stylelist;
|
||||||
$page['stored'] = isset($_GET['stored']);
|
$page['stored'] = isset($_GET['stored']);
|
||||||
|
$page['enabletracking'] = $settings['enabletracking'];
|
||||||
|
|
||||||
|
if ($settings['enabletracking']) {
|
||||||
|
$page['forminvitationstyle'] = $params['invitationstyle'];
|
||||||
|
$page['availableInvitationStyles'] = $invitationstylelist;
|
||||||
|
}
|
||||||
|
|
||||||
prepare_menu($operator);
|
prepare_menu($operator);
|
||||||
setup_settings_tabs(0);
|
setup_settings_tabs(0);
|
||||||
|
@ -26,19 +26,11 @@ require_once('../libs/operator.php');
|
|||||||
require_once('../libs/groups.php');
|
require_once('../libs/groups.php');
|
||||||
require_once('../libs/expand.php');
|
require_once('../libs/expand.php');
|
||||||
require_once('../libs/settings.php');
|
require_once('../libs/settings.php');
|
||||||
|
require_once('../libs/styles.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
|
||||||
$stylelist = array();
|
$stylelist = get_style_list("../styles/dialogs");
|
||||||
$stylesfolder = "../styles";
|
|
||||||
if ($handle = opendir($stylesfolder)) {
|
|
||||||
while (false !== ($file = readdir($handle))) {
|
|
||||||
if (preg_match("/^\w+$/", $file) && is_dir("$stylesfolder/$file")) {
|
|
||||||
$stylelist[] = $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
$preview = verifyparam("preview", "/^\w+$/", "default");
|
$preview = verifyparam("preview", "/^\w+$/", "default");
|
||||||
if (!in_array($preview, $stylelist)) {
|
if (!in_array($preview, $stylelist)) {
|
||||||
@ -56,20 +48,20 @@ if ($show == 'chat' || $show == 'mail' || $show == 'leavemessage' || $show == 'l
|
|||||||
setup_chatview_for_user(array('threadid' => 0, 'userName' => getstring("chat.default.username"), 'ltoken' => 123), "ajaxed");
|
setup_chatview_for_user(array('threadid' => 0, 'userName' => getstring("chat.default.username"), 'ltoken' => 123), "ajaxed");
|
||||||
$page['mailLink'] = "$webimroot/operator/themes.php?preview=$preview&show=mail";
|
$page['mailLink'] = "$webimroot/operator/themes.php?preview=$preview&show=mail";
|
||||||
$page['info'] = "";
|
$page['info'] = "";
|
||||||
expand("../styles", "$preview", "$show.tpl");
|
expand("../styles/dialogs", "$preview", "$show.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($show == 'survey') {
|
if ($show == 'survey') {
|
||||||
loadsettings();
|
loadsettings();
|
||||||
setup_survey("Visitor", "", "", "", "http://google.com");
|
setup_survey("Visitor", "", "", "", "http://google.com");
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("../styles", "$preview", "$show.tpl");
|
expand("../styles/dialogs", "$preview", "$show.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($show == 'mailsent' || $show == 'error') {
|
if ($show == 'mailsent' || $show == 'error') {
|
||||||
$page['email'] = "admin@yourdomain.com";
|
$page['email'] = "admin@yourdomain.com";
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("../styles", "$preview", "$show.tpl");
|
expand("../styles/dialogs", "$preview", "$show.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $show == 'agentrochat') {
|
if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $show == 'agentrochat') {
|
||||||
@ -92,7 +84,7 @@ if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $sho
|
|||||||
$page['message'] = getlocal2("chat.redirected.content", array("Administrator"));
|
$page['message'] = getlocal2("chat.redirected.content", array("Administrator"));
|
||||||
}
|
}
|
||||||
$page['redirectLink'] = "$webimroot/operator/themes.php?preview=$preview&show=redirect";
|
$page['redirectLink'] = "$webimroot/operator/themes.php?preview=$preview&show=redirect";
|
||||||
expand("../styles", "$preview", "$show.tpl");
|
expand("../styles/dialogs", "$preview", "$show.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 93 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 47 B After Width: | Height: | Size: 47 B |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 53 B After Width: | Height: | Size: 53 B |
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 50 B After Width: | Height: | Size: 50 B |
Before Width: | Height: | Size: 50 B After Width: | Height: | Size: 50 B |
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 45 B After Width: | Height: | Size: 45 B |
Before Width: | Height: | Size: 93 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 65 B After Width: | Height: | Size: 65 B |
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 50 B After Width: | Height: | Size: 50 B |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |