mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
1.4.5.2 branche merge to trunk
git-svn-id: http://xe-core.googlecode.com/svn/trunk@8275 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
312289717d
commit
20ddd23e07
19 changed files with 121 additions and 120 deletions
|
|
@ -372,6 +372,7 @@
|
|||
break;
|
||||
case 'number' :
|
||||
case 'numbers' :
|
||||
if(is_array($val)) $val = join(',', $val);
|
||||
if(!preg_match('/^(-?)[0-9]+(,\-?[0-9]+)*$/is', $val)) return new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
break;
|
||||
case 'alpha' :
|
||||
|
|
|
|||
|
|
@ -294,6 +294,13 @@
|
|||
$this->module_info->module_type = $type;
|
||||
$oModule->setModuleInfo($this->module_info, $xml_info);
|
||||
|
||||
if($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent())
|
||||
{
|
||||
global $lang;
|
||||
$footer = '<div style="margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0"><p style="color:#fff;text-align:center;margin:1em 0">'.$lang->msg_pc_to_mobile.' <a href="'.getUrl('m', '1').'" style="color:#FF0; font-weight:bold">'.$lang->cmd_move.'</a></p></div>';
|
||||
Context::addHtmlFooter($footer);
|
||||
}
|
||||
|
||||
// execute the action, and if failed, set error
|
||||
if(!$oModule->proc()) $this->error = $oModule->getMessage();
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* @brief XE의 전체 버전 표기
|
||||
* 이 파일의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야 함
|
||||
**/
|
||||
define('__ZBXE_VERSION__', '1.4.5');
|
||||
define('__ZBXE_VERSION__', '1.4.5.2');
|
||||
|
||||
/**
|
||||
* @brief zbXE가 설치된 장소의 base path를 구함
|
||||
|
|
|
|||
|
|
@ -56,6 +56,3 @@ body{background:url({getUrl()}{$layout_info->background_image}) repeat-x left to
|
|||
<p><a href="http://xpressengine.com/" target="_blank">Powered by <strong>XE</strong></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<!--@if(Mobile::isMobileCheckByAgent())-->
|
||||
<div style="margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0"><p style="color:#fff;text-align:center;margin:1em 0">{$lang->msg_pc_to_mobile} <a href="{getUrl('m', '1')}" style="color:#FF0; font-weight:bold">{$lang->cmd_move}</a></p></div>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -9,3 +9,4 @@
|
|||
.xe_content blockquote.q5{border:2px solid #707070}
|
||||
.xe_content blockquote.q6{border:1px dashed #707070}
|
||||
.xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
|
||||
.xe_content p { margin:0;}
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
$this->createWelcomePage();
|
||||
|
||||
// 설치 완료 메세지 출력
|
||||
$this->setMessage('msg_install_completed');
|
||||
}
|
||||
|
|
@ -361,116 +359,5 @@
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief install welcome page
|
||||
**/
|
||||
function createWelcomePage(){
|
||||
// ko/en/...
|
||||
$lang = Context::getLangType();
|
||||
|
||||
// insertMenu
|
||||
$menu_args->site_srl = 0;
|
||||
$menu_args->title = 'welcome_menu';
|
||||
$menu_srl = $menu_args->menu_srl = getNextSequence();
|
||||
$menu_args->listorder = $menu_srl * -1;
|
||||
|
||||
$output = executeQuery('menu.insertMenu', $menu_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// insertMenuItem
|
||||
// create 1depth menuitem
|
||||
$item_args->menu_srl = $menu_srl;
|
||||
$item_args->name = 'menu1';
|
||||
$parent_srl = $item_args->menu_item_srl = getNextSequence();
|
||||
$item_args->listorder = -1*$item_args->menu_item_srl;
|
||||
|
||||
$output = executeQuery('menu.insertMenuItem', $item_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// create 2depth menuitem
|
||||
unset($item_args);
|
||||
$item_args->menu_srl = $menu_srl;
|
||||
$item_args->parent_srl = $parent_srl;
|
||||
$item_args->url = 'welcome_page';
|
||||
$item_args->name = 'menu1-1';
|
||||
$item_args->menu_item_srl = getNextSequence();
|
||||
$item_args->listorder = -1*$item_args->menu_item_srl;
|
||||
|
||||
$output = executeQuery('menu.insertMenuItem', $item_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// XML 파일을 갱신
|
||||
$oMenuAdminController = &getAdminController('menu');
|
||||
$oMenuAdminController->makeXmlFile($menu_srl);
|
||||
|
||||
// create Layout
|
||||
//extra_vars init
|
||||
$extra_vars->colorset = 'default';
|
||||
$extra_vars->main_menu = $menu_srl;
|
||||
$extra_vars->bottom_menu = $menu_srl;
|
||||
$extra_vars->menu_name_list = array();
|
||||
$extra_vars->menu_name_list[$menu_srl] = 'welcome_menu';
|
||||
|
||||
$args->site_srl = 0;
|
||||
$layout_srl = $args->layout_srl = getNextSequence();
|
||||
$args->layout = 'xe_official';
|
||||
$args->title = 'welcome_layout';
|
||||
$args->layout_type = 'P';
|
||||
|
||||
$oLayoutAdminController = &getAdminController('layout');
|
||||
$output = $oLayoutAdminController->insertLayout($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// update Layout
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
$output = $oLayoutAdminController->updateLayout($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// insertPageModule
|
||||
$page_args->layout_srl = $layout_srl;
|
||||
$page_args->module = 'page';
|
||||
$page_args->mid = 'welcome_page';
|
||||
$page_args->module_category_srl = 0;
|
||||
$page_args->page_caching_interval = 0;
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModule($page_args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$module_srl = $output->get('module_srl');
|
||||
|
||||
// insert PageContents - widget
|
||||
$oTemplateHandler = &TemplateHandler::getInstance();
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
Context::set('version', __ZBXE_VERSION__);
|
||||
$obj->title = 'welcome_document';
|
||||
|
||||
$obj->content = $oTemplateHandler->compile('./modules/install/tpl/welcome_content', 'welcome_content_'.$lang);
|
||||
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$document_srl = $output->get('document_srl');
|
||||
|
||||
// save PageWidget
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$module_info->content = '<img src="./common/tpl/images/widget_bg.jpg" class="zbxe_widget_output" widget="widgetContent" style="WIDTH: 100%; FLOAT: left" body="" document_srl="'.$document_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" />';
|
||||
|
||||
$output = $oModuleController->updateModule($module_info);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// insertFirstModule
|
||||
$site_args->site_srl = 0;
|
||||
$site_args->index_module_srl = $module_srl;
|
||||
$oModuleController->updateSite($site_args);
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
107
modules/install/script/ko.install.php
Normal file
107
modules/install/script/ko.install.php
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
<?
|
||||
// ko/en/...
|
||||
$lang = Context::getLangType();
|
||||
|
||||
// insertMenu
|
||||
$menu_args->site_srl = 0;
|
||||
$menu_args->title = 'welcome_menu';
|
||||
$menu_srl = $menu_args->menu_srl = getNextSequence();
|
||||
$menu_args->listorder = $menu_srl * -1;
|
||||
|
||||
$output = executeQuery('menu.insertMenu', $menu_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// insertMenuItem
|
||||
// create 1depth menuitem
|
||||
$item_args->menu_srl = $menu_srl;
|
||||
$item_args->name = 'menu1';
|
||||
$parent_srl = $item_args->menu_item_srl = getNextSequence();
|
||||
$item_args->listorder = -1*$item_args->menu_item_srl;
|
||||
|
||||
$output = executeQuery('menu.insertMenuItem', $item_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// create 2depth menuitem
|
||||
unset($item_args);
|
||||
$item_args->menu_srl = $menu_srl;
|
||||
$item_args->parent_srl = $parent_srl;
|
||||
$item_args->url = 'welcome_page';
|
||||
$item_args->name = 'menu1-1';
|
||||
$item_args->menu_item_srl = getNextSequence();
|
||||
$item_args->listorder = -1*$item_args->menu_item_srl;
|
||||
|
||||
$output = executeQuery('menu.insertMenuItem', $item_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// XML 파일을 갱신
|
||||
$oMenuAdminController = &getAdminController('menu');
|
||||
$oMenuAdminController->makeXmlFile($menu_srl);
|
||||
|
||||
// create Layout
|
||||
//extra_vars init
|
||||
$extra_vars->colorset = 'default';
|
||||
$extra_vars->main_menu = $menu_srl;
|
||||
$extra_vars->bottom_menu = $menu_srl;
|
||||
$extra_vars->menu_name_list = array();
|
||||
$extra_vars->menu_name_list[$menu_srl] = 'welcome_menu';
|
||||
|
||||
$args->site_srl = 0;
|
||||
$layout_srl = $args->layout_srl = getNextSequence();
|
||||
$args->layout = 'xe_official';
|
||||
$args->title = 'welcome_layout';
|
||||
$args->layout_type = 'P';
|
||||
|
||||
$oLayoutAdminController = &getAdminController('layout');
|
||||
$output = $oLayoutAdminController->insertLayout($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// update Layout
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
$output = $oLayoutAdminController->updateLayout($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// insertPageModule
|
||||
$page_args->layout_srl = $layout_srl;
|
||||
$page_args->module = 'page';
|
||||
$page_args->mid = 'welcome_page';
|
||||
$page_args->module_category_srl = 0;
|
||||
$page_args->page_caching_interval = 0;
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModule($page_args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$module_srl = $output->get('module_srl');
|
||||
|
||||
// insert PageContents - widget
|
||||
$oTemplateHandler = &TemplateHandler::getInstance();
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
Context::set('version', __ZBXE_VERSION__);
|
||||
$obj->title = 'welcome_document';
|
||||
|
||||
$obj->content = $oTemplateHandler->compile('./modules/install/script/welcome_content', 'welcome_content_'.$lang);
|
||||
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$document_srl = $output->get('document_srl');
|
||||
|
||||
// save PageWidget
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$module_info->content = '<img src="./common/tpl/images/widget_bg.jpg" class="zbxe_widget_output" widget="widgetContent" style="WIDTH: 100%; FLOAT: left" body="" document_srl="'.$document_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" />';
|
||||
|
||||
$output = $oModuleController->updateModule($module_info);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// insertFirstModule
|
||||
$site_args->site_srl = 0;
|
||||
$site_args->index_module_srl = $module_srl;
|
||||
$oModuleController->updateSite($site_args);
|
||||
|
||||
?>
|
||||
|
|
@ -537,6 +537,7 @@
|
|||
if($args) {
|
||||
foreach($args as $key => $val) {
|
||||
if(in_array($key, array('class','style','widget_padding_top','widget_padding_right','widget_padding_bottom','widget_padding_left','widget','widgetstyle','document_srl'))) continue;
|
||||
if(!is_numeric($val) && (!is_string($val) || strlen($val)==0)) continue;
|
||||
if(strpos($val,'|@|')>0) $val = str_replace('|@|',',',$val);
|
||||
$attribute[] = sprintf('%s="%s"', $key, str_replace('"','\"',$val));
|
||||
}
|
||||
|
|
@ -557,10 +558,10 @@
|
|||
// args 정리
|
||||
$attribute = array();
|
||||
if($args) {
|
||||
$allowed_key = array('class','style','widget_padding_top','widget_padding_right','widget_padding_bottom','widget_padding_left','widget');
|
||||
foreach($args as $key => $val) {
|
||||
if(!is_string($val . "")) continue;
|
||||
if(in_array($key, array('class','style','widget_padding_top','widget_padding_right','widget_padding_bottom','widget_padding_left','widget'))) continue;
|
||||
if(!is_string($val) || strlen($val)==0) continue;
|
||||
if(in_array($key, $allowed_key)) continue;
|
||||
if(!is_numeric($val) && (!is_string($val) || strlen($val)==0)) continue;
|
||||
if(strpos($val,'|@|')>0) $val = str_replace('|@|',',',$val);
|
||||
$attribute[] = sprintf('%s="%s"', $key, str_replace('"','\"',$val));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue