rhymix/modules/ncenterlite/ncenterlite.mobile.php
Kijin Sung f0ad692650 Enable responsive skin in member, communication, and ncenterlite
회원, 커뮤니케이션, 알림센터Lite 모듈에서 모바일 스킨을 선택할 때
PC와 동일한 반응형 스킨을 지정할 수 있도록 개선
2017-12-05 23:58:04 +09:00

38 lines
930 B
PHP

<?php
class ncenterliteMobile extends ncenterliteView
{
function init()
{
$oNcenterliteModel = getModel('ncenterlite');
$config = $oNcenterliteModel->getConfig();
$mskin = $config->mskin;
if(!$mskin)
{
$template_path = sprintf('%sm.skins/%s/', $this->module_path, 'default');
}
elseif($mskin === '/USE_RESPONSIVE/')
{
$template_path = sprintf("%sskins/%s/", $this->module_path, $config->skin);
if(!is_dir($template_path) || !$config->skin)
{
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
}
}
else
{
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
}
$this->setTemplatePath($template_path);
$oLayoutModel = getModel('layout');
$layout_info = $oLayoutModel->getLayout($config->mlayout_srl);
if($layout_info)
{
$this->module_info->mlayout_srl = $config->mlayout_srl;
$this->setLayoutPath($layout_info->path);
}
}
}