From 54a39f982efca792ec7b3d17a7c59de3407879bd Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Sun, 5 Apr 2009 00:08:26 +0000 Subject: [PATCH] survey preview git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@454 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/locales/en/properties | 1 + src/messenger/webim/operator/preview.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 22c72c7b..6f7c406e 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -246,6 +246,7 @@ page.preview.redirect=Redirect visitor to another operator window page.preview.redirected="Visitor is redirected" window page.preview.showerr=Show errors page.preview.style_default=-from general settings- +page.preview.survey=Pre-chat survey page.preview.title=Site style page.preview.userchat=Chat window (user-mode) page.translate.descr=If you don't like the translation, please send us an update. diff --git a/src/messenger/webim/operator/preview.php b/src/messenger/webim/operator/preview.php index 1c76d559..3c90a374 100644 --- a/src/messenger/webim/operator/preview.php +++ b/src/messenger/webim/operator/preview.php @@ -38,7 +38,7 @@ if(!in_array($preview, $stylelist)) { $preview = $stylelist[0]; } -$show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", ""); +$show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|survey|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", ""); $showerrors = verifyparam("showerr", "/^on$/", "") == "on"; $errors = array(); if($showerrors) { @@ -52,6 +52,13 @@ if($show == 'chat' || $show == 'mail' || $show == 'leavemessage' || $show == 'le expand("../styles", "$preview", "$show.tpl"); exit; } +if($show == 'survey') { + loadsettings(); + setup_survey("Visitor", "", "", "", "http://google.com"); + setup_logo(); + expand("../styles", "$preview", "$show.tpl"); + exit; +} if($show == 'mailsent') { $page['email'] = "admin@yourdomain.com"; setup_logo(); @@ -85,6 +92,7 @@ $templateList = array( array('label' => getlocal("page.preview.userchat"), 'id' => 'chat', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.chatsimple"), 'id' => 'chatsimple', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.nochat"), 'id' => 'nochat', 'h' => 480, 'w' => 640), + array('label' => getlocal("page.preview.survey"), 'id' => 'survey', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.leavemessage"), 'id' => 'leavemessage', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.leavemessagesent"), 'id' => 'leavemessagesent', 'h' => 480, 'w' => 640), array('label' => getlocal("page.preview.mail"), 'id' => 'mail', 'h' => 254, 'w' => 603), @@ -104,7 +112,7 @@ $page['formshowerr'] = $showerrors; $page['availablePreviews'] = $stylelist; $page['availableTemplates'] = array( "chat", "chatsimple", "nochat", - "leavemessage", "leavemessagesent", + "survey", "leavemessage", "leavemessagesent", "mail", "mailsent", "redirect", "redirected", "agentchat", "agentrochat",