From b7eaab3fc7a76dd3112fcb474c1fa3c13fe42acc Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sat, 10 Apr 2021 19:12:19 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20#1683=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=EC=8A=A4=ED=82=A8=EC=9D=98=20=EC=84=A4=EC=A0=95=EC=9D=B4=20PC?= =?UTF-8?q?=EC=99=80=20=EB=8F=99=EC=9D=BC=ED=95=9C=20=EB=B0=98=EC=9D=91?= =?UTF-8?q?=ED=98=95=20=EC=8A=A4=ED=82=A8=20=EC=82=AC=EC=9A=A9=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20=EC=9E=AC=EB=8C=80?= =?UTF-8?q?=EB=A1=9C=20=EC=9E=91=EB=8F=99=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ncenterlite/ncenterlite.controller.php | 55 ++++++++----------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index e26874946..362b2250e 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -1098,11 +1098,21 @@ class ncenterliteController extends ncenterlite if(Mobile::isFromMobilePhone()) { $this->template_path = sprintf('%sm.skins/%s/', $this->module_path, $config->mskin); - if(!is_dir($this->template_path) || !$config->mskin) + if(!$config->mskin) { $config->mskin = 'default'; $this->template_path = sprintf('%sm.skins/%s/', $this->module_path, $config->mskin); } + // If use to same PC skin set. + else if ($config->mskin === '/USE_RESPONSIVE/') + { + $this->template_path = sprintf('%sskins/%s/', $this->module_path, $config->skin); + if(!$config->skin) + { + $config->skin = 'default'; + $this->template_path = sprintf('%sskins/%s/', $this->module_path, $config->skin); + } + } } else { @@ -1114,9 +1124,10 @@ class ncenterliteController extends ncenterlite } } + $oTemplateHandler = TemplateHandler::getInstance(); + $result = $oTemplateHandler->compile($this->template_path, 'ncenterlite.html'); $this->_addFile(); - $html = $this->_getTemplate(); - $output_display = $html . $output_display; + $output_display = $result . $output_display; } function triggerAddMemberMenu() @@ -1163,14 +1174,8 @@ class ncenterliteController extends ncenterlite } $config = NcenterliteModel::getConfig(); - if(!Mobile::isFromMobilePhone()) - { - if($config->colorset && file_exists(FileHandler::getRealPath($this->template_path . 'ncenterlite.' . $config->colorset . '.css'))) - { - Context::loadFile(array($this->template_path . 'ncenterlite.' . $config->colorset . '.css', '', '', 100)); - } - } - elseif(Mobile::isFromMobilePhone()) + + if(Mobile::isFromMobilePhone() && $config->mskin !== '/USE_RESPONSIVE/') { if($config->mcolorset && file_exists(FileHandler::getRealPath($this->template_path . 'ncenterlite.' . $config->mcolorset . '.css'))) { @@ -1181,32 +1186,20 @@ class ncenterliteController extends ncenterlite Context::loadFile(array('./common/js/xe.min.js', 'head', '', -100000)); Context::loadFile(array($this->template_path . 'ncenterlite.mobile.css', '', '', 100)); } + else + { + if($config->colorset && file_exists(FileHandler::getRealPath($this->template_path . 'ncenterlite.' . $config->colorset . '.css'))) + { + Context::loadFile(array($this->template_path . 'ncenterlite.' . $config->colorset . '.css', '', '', 100)); + } + } + if($config->zindex) { Context::set('ncenterlite_zindex', ' style="z-index:' . $config->zindex . ';" '); } } - function _getTemplate() - { - $oNcenterModel = getModel('ncenterlite'); - $config = $oNcenterModel->getConfig(); - - $oTemplateHandler = TemplateHandler::getInstance(); - - if(Mobile::isFromMobilePhone()) - { - $path = sprintf('%sm.skins/%s/', $this->module_path, $config->mskin); - } - else - { - $path = sprintf('%sskins/%s/', $this->module_path, $config->skin); - } - $result = $oTemplateHandler->compile($path, 'ncenterlite.html'); - - return $result; - } - function updateNotifyRead($notify, $member_srl) { $args = new stdClass();