mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1255 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1d28f14c5f
commit
efbf4988bc
5 changed files with 68 additions and 49 deletions
|
|
@ -303,11 +303,22 @@
|
|||
}
|
||||
|
||||
// serialize하여 저장
|
||||
$obj->category_xml_file = sprintf("./files/cache/blog_category/%s.xml.php", $module_srl);
|
||||
$skin_vars = serialize($obj);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->updateModuleSkinVars($module_srl, $skin_vars);
|
||||
|
||||
// 레이아웃 확장변수 수정
|
||||
$layout_args->extra_vars = $skin_vars;
|
||||
$layout_args->layout_srl = $module_srl;
|
||||
$oLayoutController = &getController('layout');
|
||||
$output = $oLayoutController->updateLayout($layout_args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile("top_refresh.html");
|
||||
}
|
||||
|
|
@ -378,8 +389,8 @@
|
|||
// 레이아웃 등록
|
||||
$layout_args->layout_srl = $layout_args->module_srl = $module_srl;
|
||||
$layout_args->layout = 'blog';
|
||||
$layout_args->title = sprintf('%s (%s)',$args->browser_title, $args->mid);
|
||||
$layout_args->layout_path = sprintf('./modules/blog/skin/%s/layout.html', $args->skin);
|
||||
$layout_args->title = sprintf('%s - %s',$args->browser_title, $args->mid);
|
||||
$layout_args->layout_path = sprintf('./modules/blog/skins/%s/layout.html', $args->skin);
|
||||
|
||||
$oLayoutController = &getController('layout');
|
||||
$output = $oLayoutController->insertLayout($layout_args);
|
||||
|
|
@ -400,8 +411,7 @@
|
|||
// 레이아웃 수정
|
||||
$layout_args->layout_srl = $layout_args->module_srl = $module_srl;
|
||||
$layout_args->title = $args->browser_title;
|
||||
$layout_args->extra_vars = $args->extra_vars;
|
||||
$layout_args->layout_path = sprintf('./modules/blog/skin/%s/layout.html', $args->skin);
|
||||
$layout_args->layout_path = sprintf('./modules/blog/skins/%s/layout.html', $args->skin);
|
||||
|
||||
$oLayoutController = &getController('layout');
|
||||
$output = $oLayoutController->updateLayout($layout_args);
|
||||
|
|
|
|||
|
|
@ -15,9 +15,6 @@
|
|||
function init() {
|
||||
if(substr_count($this->act, 'Admin')) $this->initAdmin();
|
||||
else $this->initNormal();
|
||||
|
||||
// 카테고리 xml 파일 위치 지정
|
||||
$this->module_info->category_xml_file = sprintf('./files/cache/blog_category/%d.xml.php', $this->module_info->module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -37,10 +34,7 @@
|
|||
// module_srl이 넘어오면 해당 모듈의 정보를 미리 구해 놓음
|
||||
if($module_srl) {
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$module_info) {
|
||||
Context::set('module_srl','');
|
||||
$this->act = 'list';
|
||||
} else {
|
||||
if($module_info->module_srl == $module_srl) {
|
||||
$this->module_info = $module_info;
|
||||
Context::set('module_info',$module_info);
|
||||
}
|
||||
|
|
@ -50,14 +44,8 @@
|
|||
$module_category = $oModuleModel->getModuleCategories();
|
||||
Context::set('module_category', $module_category);
|
||||
|
||||
// 만약 블로그 서비스 페이지에서 관리자 기능 호출시 레이아웃을 지정
|
||||
if($this->mid) {
|
||||
$layout_path = sprintf("%sskins/%s/",$this->module_path, $this->skin);
|
||||
|
||||
// 레이아웃 지정
|
||||
$this->setLayoutPath($layout_path);
|
||||
$this->setLayoutFile("layout");
|
||||
}
|
||||
// 만약 블로그 서비스 페이지에서 관리자 기능 호출시 관련 정보를 위해서 initNoraml() method 호출
|
||||
if($this->mid) $this->initNormal();
|
||||
|
||||
// 템플릿 경로 지정 (blog의 경우 tpl에 관리자용 템플릿 모아놓음)
|
||||
$this->setTemplatePath($this->module_path."tpl");
|
||||
|
|
@ -77,28 +65,37 @@
|
|||
// 스킨 경로 구함
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->skin);
|
||||
|
||||
// 레이아웃 지정
|
||||
// 레이아웃 경로와 파일 지정 (블로그는 자체 레이아웃을 가지고 있음)
|
||||
$this->setLayoutPath($template_path);
|
||||
$this->setLayoutFile("layout");
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
// rss url
|
||||
if($this->grant->list) Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBlogRss'));
|
||||
|
||||
// 카테고리 목록을 가져오고 선택된 카테고리의 값을 설정
|
||||
$oDocumentModel = &getModel('document');
|
||||
$this->category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
||||
Context::set('category_list', $this->category_list);
|
||||
|
||||
// 선택된 카테고리 목록이 있으면 zbxe_url을 변경하여 트리메뉴에서 카테고리까지 참조할 수 있도록 함
|
||||
$category_srl = Context::get('category');
|
||||
if($this->category_list[$category_srl]) {
|
||||
$this->category_srl = $category_srl;
|
||||
Context::set('zbxe_url', sprintf("mid=%s&category=%d", $this->module_info->mid, $this->category_srl));
|
||||
}
|
||||
|
||||
// 카테고리 xml 파일 위치 지정
|
||||
$this->module_info->category_xml_file = sprintf('./files/cache/blog_category/%d.xml.php', $this->module_info->module_srl);
|
||||
|
||||
// 레이아웃의 정보를 속이기 위해서 layout_srl을 현 블로그의 module_srl로 입력
|
||||
$this->module_info->layout_srl = $this->module_info->module_srl;
|
||||
|
||||
// 모듈정보와 레이아웃에서 사용하기 위한 레이아웃 정보를 세팅
|
||||
Context::set('module_info',$this->module_info);
|
||||
Context::set('layout_info',$this->module_info);
|
||||
|
||||
// rss url 만듬
|
||||
if($this->grant->list) Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBlogRss'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -553,9 +550,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 메뉴 출력
|
||||
* @brief 메뉴 정보
|
||||
**/
|
||||
function dispBlogAdminMenuInfo() {
|
||||
// module_srl을 구함
|
||||
$module_srl = $this->module_info->module_srl;
|
||||
|
||||
$this->setTemplateFile('category_list');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<!-- 레이아웃과 연동될 css 파일 import -->
|
||||
<!--%import("css/layout.css")-->
|
||||
|
||||
<!-- 블로그 메뉴를 common/js/tree_menu.js를 이용해서 표시 -->
|
||||
<script type="text/javascript">
|
||||
loadTreeMenu("{$module_info->category_xml_file}", "blog_category", "blog_category", "{$module_info->category_name?$module_info->category_name:'category'}", "./?mid={$mid}");
|
||||
loadTreeMenu("./files/cache/blog_category/{$layout_info->layout_srl}.xml.php", "blog_category", "blog_category", "{$layout_info->category_name?$layout_info->category_name:'category'}", "./?mid={$mid}");
|
||||
</script>
|
||||
|
||||
|
||||
|
|
@ -11,12 +10,12 @@
|
|||
<div class="layout_top">
|
||||
|
||||
<div class="layout_logo">
|
||||
<!--@if($module_info->logo_image)-->
|
||||
<a href="./?mid={$mid}"><img src="{$module_info->logo_image}" border="0" alt="{$module_info->browser_title}"/></a>
|
||||
<!--@if($layout_info->logo_image)-->
|
||||
<a href="./?mid={$mid}"><img src="{$layout_info->logo_image}" border="0" alt="{$layout_info->browser_title}"/></a>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($module_info->top_title)-->
|
||||
<a href="./?mid={$mid}">{$module_info->top_title}</a>
|
||||
<!--@if($layout_info->top_title)-->
|
||||
<a href="./?mid={$mid}">{$layout_info->top_title}</a>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
|
|
@ -43,25 +42,25 @@
|
|||
|
||||
<!-- 왼쪽 분류 출력 -->
|
||||
<div class="layout_left">
|
||||
<!--@if($module_info->profile || $module_info->profile_image)-->
|
||||
<!--@if($layout_info->profile || $layout_info->profile_image)-->
|
||||
<!-- 프로필 -->
|
||||
<div class="layout_profile">
|
||||
<!--@if($module_info->profile_image)-->
|
||||
<!--@if($layout_info->profile_image)-->
|
||||
<div class="profile_image">
|
||||
<img src="{$module_info->profile_image}" border="0" alt="profile image" />
|
||||
<img src="{$layout_info->profile_image}" border="0" alt="profile image" />
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($module_info->profile)-->
|
||||
<!--@if($layout_info->profile)-->
|
||||
<div class="profile">
|
||||
{$module_info->profile}
|
||||
{$layout_info->profile}
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($logged_info->is_admin == 'Y')-->
|
||||
<!-- 관리자일 경우 블로그 관리 메뉴 -->
|
||||
<div class="layout_admin">
|
||||
<a href="#" onclick="location.href='{getUrl('act','dispBlogAdminBlogInfo','layout_srl',$module_info->layout_srl)}';return false;">{$lang->cmd_management}</a>
|
||||
<a href="#" onclick="location.href='{getUrl('act','dispBlogAdminBlogInfo','layout_srl',$layout_info->layout_srl)}';return false;">{$lang->cmd_management}</a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue