cafeXE 개선

1. 게시판/페이지 외에 최고관리자가 지정한 서비스 모듈을 생성/관리 가능하도록 개선
2. 최고관리자는 기본 레이아웃/ 레이아웃 변경 기능 제한/ 카페별 서비스 모듈 생성 개수를 지정하는 기능 추가
3. 생성된 카페의 도메인/vid 등을 수정할 수 있는 기능 추가
4. 카페 관리자가 메뉴 추가시에 메뉴명과 서비스 모듈 종류만 지정하면 모듈이 생성되도록 개선
5. 가상사이트와 기본 사이트간의 모듈을 옮길 수 있는 기능 추가


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6171 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-04-22 10:38:47 +00:00
parent b2e0e09529
commit 5bb5fa23a8
68 changed files with 721 additions and 617 deletions

View file

@ -6,8 +6,7 @@
<action name="dispLifepodContent" type="view" index="true" />
<action name="dispLifepodAdminContent" type="view" standalone="true" admin_index="true" />
<action name="dispLifepodAdminLifepodInfo" type="view" standalone="true" />
<action name="dispLifepodAdminInsertLifepod" type="view" standalone="true" />
<action name="dispLifepodAdminInsertLifepod" type="view" standalone="true" setup_index="true" />
<action name="dispLifepodAdminDeleteLifepod" type="view" standalone="true" />
<action name="dispLifepodAdminGrantInfo" type="view" standalone="true" />
<action name="dispLifepodAdminSkinInfo" type="view" standalone="true" />

View file

@ -76,32 +76,6 @@
$this->setTemplateFile('index');
}
/**
* @brief 선택된 모듈의 정보 출력
**/
function dispLifepodAdminLifepodInfo() {
// module_srl 값이 없다면 그냥 index 페이지를 보여줌
if(!Context::get('module_srl')) return $this->dispLifepodAdminContent();
// 레이아웃이 정해져 있다면 레이아웃 정보를 추가해줌(layout_title, layout)
if($this->module_info->layout_srl) {
$oLayoutModel = &getModel('layout');
$layout_info = $oLayoutModel->getLayout($this->module_info->layout_srl);
$this->module_info->layout = $layout_info->layout;
$this->module_info->layout_title = $layout_info->layout_title;
}
// 정해진 스킨이 있으면 해당 스킨의 정보를 구함
if($this->module_info->skin) {
$oModuleModel = &getModel('module');
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->module_info->skin);
$this->module_info->skin_title = $skin_info->title;
}
// 템플릿 파일 지정
$this->setTemplateFile('lifepod_info');
}
/**
* @brief 모듈 설정 출력
**/

View file

@ -24,6 +24,10 @@
* $this->module_path는 ./modules/guestbook/ 값을 가지고 있다
**/
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
if(!is_dir($template_path)||!$this->module_info->skin) {
$this->module_info->skin = 'xe_official';
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
}
$this->setTemplatePath($template_path);
}
@ -41,44 +45,46 @@
**/
function dispLifepodContent() {
$oLifepodModel = &getModel('lifepod');
$caladdresses = split(", ", $this->module_info->calendar_address);
$cYear = Context::get('year');
$cMonth = Context::get('month');
$cDay = Context::get('day');
if($caladdresses) {
$caladdresses = split(", ", $this->module_info->calendar_address);
$cYear = Context::get('year');
$cMonth = Context::get('month');
$cDay = Context::get('day');
$calendars = array();
foreach($caladdresses as $key=>$val)
{
$shouldGetMore = false;
$pageNumber = 1;
$page = null;
do {
$page = $oLifepodModel->getPage($val, $cYear, $pageNumber);
if(!$page) break;
for($j=0;$j<count($page->data);$j++)
$calendars = array();
foreach($caladdresses as $key=>$val)
{
$data = &$page->data[$j];
if($data->childNodes["date-start"])
{
$data->childNodes["date-start"]->body = $this->dateFormatChange($data->childNodes["date-start"]->body);
}
$shouldGetMore = false;
$pageNumber = 1;
$page = null;
do {
$page = $oLifepodModel->getPage($val, $cYear, $pageNumber);
if(!$page) break;
for($j=0;$j<count($page->data);$j++)
{
$data = &$page->data[$j];
if($data->childNodes["date-start"])
{
$data->childNodes["date-start"]->body = $this->dateFormatChange($data->childNodes["date-start"]->body);
}
if($data->childNodes["date-end"])
{
$plus = 0;
if($data->childNodes["type"]->body == "daylong")
$plus = -1;
$data->childNodes["date-end"]->body = $this->dateFormatChange($data->childNodes["date-end"]->body, $plus);
}
if($data->childNodes["date-end"])
{
$plus = 0;
if($data->childNodes["type"]->body == "daylong")
$plus = -1;
$data->childNodes["date-end"]->body = $this->dateFormatChange($data->childNodes["date-end"]->body, $plus);
}
$data->childNodes["description"]->body = str_replace("\n", "<BR />", $data->childNodes["description"]->body);
$data->childNodes["description"]->body = str_replace("'", "\'", $data->childNodes["description"]->body);
$data->childNodes["title"]->body = str_replace("'", "\'", $data->childNodes["title"]->body);
$data->childNodes["description"]->body = str_replace("\n", "<BR />", $data->childNodes["description"]->body);
$data->childNodes["description"]->body = str_replace("'", "\'", $data->childNodes["description"]->body);
$data->childNodes["title"]->body = str_replace("'", "\'", $data->childNodes["title"]->body);
}
$calendars[] = $page;
$pageNumber++;
} while ( $page->start + $page->perpage - 1 < $page->total );
}
$calendars[] = $page;
$pageNumber++;
} while ( $page->start + $page->perpage - 1 < $page->total );
}
Context::set('calendars', $calendars);

View file

@ -37,7 +37,7 @@ xAddEventListener(window, 'load', startLifepod);
<!--// 관리자이면 설정 버튼 출력 -->
<!--@if($grant->is_admin)-->
<li class="setup"><a href="{getUrl('act','dispLifepodAdminLifepodInfo')}">{$lang->cmd_setup}</a></li>
<li class="setup"><a href="{getUrl('act','dispLifepodAdminInsertLifepod')}">{$lang->cmd_setup}</a></li>
<!--@end-->
<!--// 최고관리자이면 관리자 페이지 버튼 출력 -->

View file

@ -16,7 +16,7 @@
<!--@else-->
<li><a href="{getUrl('act','')}">{$lang->cmd_back}</a></li>
<!--@end-->
<li <!--@if($act=='dispLifepodAdminLifepodInfo'||$act=='dispLifepodAdminInsertLifepod')-->class="on"<!--@end-->><a href="{getUrl('act','dispLifepodAdminLifepodInfo')}">{$lang->cmd_view_info}</a></li>
<li <!--@if($act=='dispLifepodAdminInsertLifepod')-->class="on"<!--@end-->><a href="{getUrl('act','dispLifepodAdminInsertLifepod')}">{$lang->cmd_view_info}</a></li>
<li <!--@if($act=='dispLifepodAdminGrantInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispLifepodAdminGrantInfo')}">{$lang->cmd_manage_grant}</a></li>
<li <!--@if($act=='dispLifepodAdminSkinInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispLifepodAdminSkinInfo')}">{$lang->cmd_manage_skin}</a></li>
</ul>

View file

@ -48,7 +48,7 @@
<td>{htmlspecialchars($val->mid)}</td>
<td><a href="{getUrl('','mid',$val->mid)}" onclick="window.open(this.href); return false;">{htmlspecialchars($val->browser_title)}</a></td>
<td class="date nowrap center">{zdate($val->regdate,"Y-m-d")}</td>
<td><a href="{getUrl('act','dispLifepodAdminLifepodInfo','module_srl',$val->module_srl)}" class="buttonSet buttonSetting"><span>{$lang->cmd_setting}</span></a></td>
<td><a href="{getUrl('act','dispLifepodAdminInsertLifepod','module_srl',$val->module_srl)}" class="buttonSet buttonSetting"><span>{$lang->cmd_setting}</span></a></td>
<td><a href="{getUrl('act','dispLifepodAdminDeleteLifepod','module_srl', $val->module_srl)}" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a></td>
</tr>
<!--@end-->

View file

@ -14,7 +14,7 @@ function completeInsertLifepod(ret_obj) {
alert(message);
var url = current_url.setQuery('act','dispLifepodAdminLifepodInfo');
var url = current_url.setQuery('act','dispLifepodAdminInsertLifepod');
if(module_srl) url = url.setQuery('module_srl',module_srl);
if(page) url.setQuery('page',page);
location.href = url;

View file

@ -9,6 +9,9 @@
<input type="hidden" name="use_category" value="N" />
<table cellspacing="0" class="rowTable">
<!--@if($logged_info->is_admin!='Y')-->
<input type="hidden" name="mid" value="{$module_info->mid}" />
<!--@else-->
<tr class="row2">
<th scope="row"><div>{$lang->mid}</div></th>
<td class="wide">
@ -16,6 +19,7 @@
<p>{$lang->about_mid}</p>
</td>
</tr>
<!--@end-->
<tr class="row2">
<th scope="row"><div>{$lang->module_category}</div></th>
<td>