From aa3435bfd7cad69dbdcaf64d068033ff2de1fa77 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Tue, 18 Feb 2014 09:11:47 +0000 Subject: [PATCH] Use chat window params from config for button generation --- src/mibew/libs/getcode.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mibew/libs/getcode.php b/src/mibew/libs/getcode.php index cf5c156e..ec8d99c5 100644 --- a/src/mibew/libs/getcode.php +++ b/src/mibew/libs/getcode.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\ChatStyle; use Mibew\Style\InvitationStyle; function generate_button( @@ -48,7 +49,15 @@ function generate_button( "'" . $link, "url='+escape(document.location.href$modsecfix)+'&referrer='+escape(document.referrer$modsecfix)" ); - $popup_options = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1"; + + // Get popup window configurations + if ($style) { + $chat_style = new ChatStyle($style); + $chat_configurations = $chat_style->configurations(); + $popup_options = $chat_configurations['chat']['window_params']; + } else { + $popup_options = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1"; + } // Generate operator code field if ($operator_code) {