fixed template path

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9470 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2011-10-02 15:06:15 +00:00
parent 6d7b9df694
commit cebf35f92a

View file

@ -20,16 +20,18 @@
// Get configurations (using module model object)
$oModuleModel = &getModel('module');
$this->module_config = $config = $oModuleModel->getModuleConfig('message', $this->module_info->site_srl);
if(!$config->skin) $config->skin = 'default';
else{
//check theme
$config_parse = explode('.', $config->skin);
if (count($config_parse) > 1){
$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
}else{
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
}
}
if(!$config->skin){
$config->skin = 'default';
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
}else{
//check theme
$config_parse = explode('.', $config->skin);
if (count($config_parse) > 1){
$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
}else{
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
}
}
// Template path
$this->setTemplatePath($template_path);