mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
issue 2168 set member skin through theme. And update path of theme skin using for '|@|'.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11016 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b36ed4295b
commit
2b6f473b26
15 changed files with 344 additions and 98 deletions
|
|
@ -11,24 +11,43 @@ class HTMLDisplayHandler {
|
|||
$oTemplate = &TemplateHandler::getInstance();
|
||||
|
||||
// compile module tpl
|
||||
if ($oModule->module_info->module == $oModule->module)
|
||||
$skin = $oModule->origin_module_info->skin;
|
||||
else
|
||||
$skin = $oModule->module_config->skin;
|
||||
// deprecated themes skin
|
||||
|
||||
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin') === false){
|
||||
if ($skin && is_string($skin)){
|
||||
$theme_skin = explode('.', $skin);
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
if (count($theme_skin) == 2) {
|
||||
$theme_path = sprintf('./themes/%s',$theme_skin[0]);
|
||||
if(substr($theme_path,0,strlen($theme_path)) != $theme_path)
|
||||
$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
|
||||
}
|
||||
}else{
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
|
||||
if(!is_dir($template_path))
|
||||
{
|
||||
if ($oModule->module_info->module == $oModule->module)
|
||||
$skin = $oModule->origin_module_info->skin;
|
||||
else
|
||||
$skin = $oModule->module_config->skin;
|
||||
|
||||
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin') === false)
|
||||
{
|
||||
if ($skin && is_string($skin))
|
||||
{
|
||||
$theme_skin = explode('|@|', $skin);
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
if (count($theme_skin) == 2)
|
||||
{
|
||||
$theme_path = sprintf('./themes/%s',$theme_skin[0]);
|
||||
if(substr($theme_path,0,strlen($theme_path)) != $theme_path)
|
||||
{
|
||||
$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
}
|
||||
}else $template_path = $oModule->getTemplatePath();
|
||||
}
|
||||
|
||||
$tpl_file = $oModule->getTemplateFile();
|
||||
|
||||
$output = $oTemplate->compile($template_path, $tpl_file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue