mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Apply consistent layout and skin code to communication and ncenterlite modules
This commit is contained in:
parent
ed557883c7
commit
c5a3f5722a
4 changed files with 5 additions and 107 deletions
|
|
@ -11,38 +11,9 @@ class communicationMobile extends communicationView
|
|||
|
||||
function init()
|
||||
{
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
$this->config = $oCommunicationModel->getConfig();
|
||||
$this->config = CommunicationModel::getConfig();
|
||||
Context::set('communication_config', $this->config);
|
||||
|
||||
$mskin = $this->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, $this->config->skin);
|
||||
if(!is_dir($template_path) || !$this->config->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
|
||||
}
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->config->mlayout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->mlayout_srl = $this->config->mlayout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
|
||||
$this->setTemplatePath($template_path);
|
||||
$this->setLayoutAndTemplatePaths('M', $this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,33 +15,9 @@ class communicationView extends communication
|
|||
*/
|
||||
function init()
|
||||
{
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
$this->config = $oCommunicationModel->getConfig();
|
||||
$skin = $this->config->skin;
|
||||
|
||||
$this->config = CommunicationModel::getConfig();
|
||||
Context::set('communication_config', $this->config);
|
||||
|
||||
$config_parse = explode('|@|', $skin);
|
||||
|
||||
if(count($config_parse) > 1)
|
||||
{
|
||||
$tpl_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
}
|
||||
|
||||
$this->setTemplatePath($tpl_path);
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->config->layout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->layout_srl = $this->config->layout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
$this->setLayoutAndTemplatePaths('P', $this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue