mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
issue 1894 modify name of layout in theme, add 'skin fixed' option on page info.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10954 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f7109b400e
commit
339c6e6d29
6 changed files with 56 additions and 7 deletions
|
|
@ -215,10 +215,9 @@
|
|||
|
||||
$oXmlParser = new XmlParser();
|
||||
$_xml_obj = $oXmlParser->loadXmlFile($info_file);
|
||||
if(!$_xml_obj->theme) return;
|
||||
|
||||
if(!$_xml_obj->theme) return;
|
||||
$xml_obj = $_xml_obj->theme;
|
||||
if(!$_xml_obj->theme) return;
|
||||
|
||||
// 스킨이름
|
||||
$theme_info->name = $theme_name;
|
||||
|
|
@ -247,7 +246,7 @@
|
|||
$layout_parse = explode('/',$layout_path);
|
||||
switch($layout_parse[1]){
|
||||
case 'themes' : {
|
||||
$layout_info->name = $theme_name.'.'.$layout_parse[count($layout_parse)-1];
|
||||
$layout_info->name = $theme_name.'|@|'.$layout_parse[count($layout_parse)-1];
|
||||
break;
|
||||
}
|
||||
case 'layouts' : {
|
||||
|
|
@ -255,6 +254,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
$layout_info->title = $layout_parse[count($layout_parse)-1];
|
||||
$layout_info->path = $layout_path;
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->layout_srl = getNextSequence();
|
||||
$args->layout = $layout_info->name;
|
||||
$args->title = $layout_info->name;
|
||||
$args->title = $layout_info->title;
|
||||
$args->layout_type = "P";
|
||||
// Insert into the DB
|
||||
$oLayoutAdminController = &getAdminController('layout');
|
||||
|
|
|
|||
|
|
@ -188,8 +188,7 @@
|
|||
$output = $this->updateLayout($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
return $output;
|
||||
return $this->setRedirectUrl(Context::get('error_return_url'), $output);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -35,6 +35,18 @@
|
|||
|
||||
if(!$oDB->isColumnExists('layouts', 'layout_type')) return true;
|
||||
|
||||
$args->layout = '.';
|
||||
$output = executeQueryArray('layout.getLayoutDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $layout)
|
||||
{
|
||||
$layout_path = explode('.', $layout->layout);
|
||||
if(count($layout_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1]))) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +78,21 @@
|
|||
$oDB->addColumn('layouts','layout_type','char',1,'P',true);
|
||||
}
|
||||
|
||||
$output = executeQueryArray('layout.getLayoutDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $layout)
|
||||
{
|
||||
$layout_path = explode('.', $layout->layout);
|
||||
if(count($layout_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1])))
|
||||
{
|
||||
$args->layout = implode('|@|', $layout_path);
|
||||
$args->layout_srl = $layout->layout_srl;
|
||||
$output = executeQuery('layout.updateLayout', $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
* @return string path of layout
|
||||
**/
|
||||
function getLayoutPath($layout_name, $layout_type = "P") {
|
||||
$layout_parse = explode('.', $layout_name);
|
||||
$layout_parse = explode('|@|', $layout_name);
|
||||
if (count($layout_parse) > 1){
|
||||
$class_path = './themes/'.$layout_parse[0].'/layouts/'.$layout_parse[1].'/';
|
||||
}else if($layout_name == 'faceoff'){
|
||||
|
|
|
|||
16
modules/layout/queries/getLayoutDotList.xml
Normal file
16
modules/layout/queries/getLayoutDotList.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<query id="getLayoutDotList" action="select">
|
||||
<tables>
|
||||
<table name="layouts" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" filter="number" default="0" notnull="notnull" />
|
||||
<condition operation="equal" column="layout_type" var="layout_type" default="P" pipe="and" />
|
||||
<condition operation="like" column="layout" var="layout" default="." pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="layout_srl" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -101,6 +101,13 @@
|
|||
</tr>
|
||||
<!--@end-->
|
||||
<!--@if($module_info->page_type == 'ARTICLE')-->
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_fix}</th>
|
||||
<td class="text">
|
||||
<input type="checkbox" name="is_skin_fix" id="is_skin_fix" value="Y" checked="checked"|cond="$module_info->is_skin_fix == 'Y'" />
|
||||
<p>{$lang->about_skin_fix}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td class="text">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue