Use chat window params from config for button generation

This commit is contained in:
Dmitriy Simushev 2014-02-18 09:11:47 +00:00
parent f0f612b11a
commit aa3435bfd7

View File

@ -17,6 +17,7 @@
// Import namespaces and classes of the core // Import namespaces and classes of the core
use Mibew\Settings; use Mibew\Settings;
use Mibew\Style\ChatStyle;
use Mibew\Style\InvitationStyle; use Mibew\Style\InvitationStyle;
function generate_button( function generate_button(
@ -48,7 +49,15 @@ function generate_button(
"'" . $link, "'" . $link,
"url='+escape(document.location.href$modsecfix)+'&referrer='+escape(document.referrer$modsecfix)" "url='+escape(document.location.href$modsecfix)+'&referrer='+escape(document.referrer$modsecfix)"
); );
// 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"; $popup_options = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1";
}
// Generate operator code field // Generate operator code field
if ($operator_code) { if ($operator_code) {