mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 13:49:56 +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
|
|
@ -195,6 +195,16 @@
|
|||
// check agreement field exist
|
||||
if ($config->agreement) return true;
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
|
||||
if(is_dir($template_path)) return true;
|
||||
}
|
||||
}
|
||||
|
||||
// supprot multilanguage agreement.
|
||||
if (is_readable('./files/member_extra_info/agreement.txt')) return true;
|
||||
|
||||
|
|
@ -295,6 +305,21 @@
|
|||
$output = $oModuleController->updateModuleConfig('member', $config);
|
||||
}
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
|
||||
if(is_dir($template_path))
|
||||
{
|
||||
$config->skin = implode('|@|', $config_parse);
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->updateModuleConfig('member', $config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_readable('./files/member_extra_info/agreement.txt'))
|
||||
{
|
||||
$source_file = _XE_PATH_.'files/member_extra_info/agreement.txt';
|
||||
|
|
|
|||
|
|
@ -22,9 +22,26 @@
|
|||
|
||||
$skin = $this->member_config->skin;
|
||||
// Set the template path
|
||||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
|
||||
$this->setTemplatePath($tpl_path);
|
||||
if(!$skin)
|
||||
{
|
||||
$skin = 'default';
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
}
|
||||
else
|
||||
{
|
||||
//check theme
|
||||
$config_parse = explode('|@|', $skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
}
|
||||
}
|
||||
// Template path
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->member_config->layout_srl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue