mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#495 module모듈 새 XML 포맷 처리 코드 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4360 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c2e451cbad
commit
6664cfd28f
9 changed files with 147 additions and 33 deletions
|
|
@ -12,6 +12,7 @@
|
|||
$lang->add_shortcut = "Add Shortcuts";
|
||||
$lang->module_action = "Actions";
|
||||
$lang->module_maker = "Module Developer";
|
||||
$lang->module_license = 'License';
|
||||
$lang->module_history = "Update history";
|
||||
$lang->category_title = "Category Title";
|
||||
$lang->header_text = 'Header Text';
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
$lang->add_shortcut = "Añadir en el menú del administrador";
|
||||
$lang->module_action = "Acción";
|
||||
$lang->module_maker = "Módulo del desarrollador";
|
||||
$lang->module_license = 'License';
|
||||
$lang->module_history = "Historia de actualización";
|
||||
$lang->category_title = "Título de categoría";
|
||||
$lang->header_text = 'Encabezado';
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
$lang->add_shortcut = "管理者メニューに追加する";
|
||||
$lang->module_action = "動作";
|
||||
$lang->module_maker = "モジュール作者";
|
||||
$lang->module_license = 'License';
|
||||
$lang->module_history = "変更内容 ";
|
||||
$lang->category_title = "カテゴリ名";
|
||||
$lang->header_text = 'ヘッダー内容';
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
$lang->add_shortcut = "관리자 메뉴에 추가";
|
||||
$lang->module_action = "동작";
|
||||
$lang->module_maker = "모듈 제작자";
|
||||
$lang->module_history = "변경 사항 ";
|
||||
$lang->module_license = '라이센스';
|
||||
$lang->module_history = '변경 이력 ';
|
||||
$lang->category_title = "분류 이름";
|
||||
$lang->header_text = '상단 내용';
|
||||
$lang->footer_text = '하단 내용';
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
$lang->add_shortcut = "Добавить ярлыки";
|
||||
$lang->module_action = "Действия";
|
||||
$lang->module_maker = "Разработчик модуля";
|
||||
$lang->module_license = 'License';
|
||||
$lang->module_history = "История обновлений";
|
||||
$lang->category_title = "Название категории";
|
||||
$lang->header_text = 'Верхний колонтитул';
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
$lang->add_shortcut = "添加到快捷菜单";
|
||||
$lang->module_action = "动作";
|
||||
$lang->module_maker = "模块作者";
|
||||
$lang->module_license = 'License';
|
||||
$lang->module_history = "更新事项 ";
|
||||
$lang->category_title = "分类名称";
|
||||
$lang->header_text = '上端内容';
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 주어진 곳의 스킨 목록을 구함
|
||||
* @brief 주어진 곳의 스킨 목록을 구함
|
||||
* 스킨과 skin.xml 파일을 분석 정리한 결과를 return
|
||||
**/
|
||||
function getSkins($path) {
|
||||
|
|
@ -445,7 +445,7 @@
|
|||
return $info;
|
||||
}
|
||||
|
||||
@include($cache_file);
|
||||
@include($cache_file);
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
|
@ -495,31 +495,83 @@
|
|||
|
||||
if(!$xml_obj) return;
|
||||
|
||||
$info->title = $xml_obj->title->body;
|
||||
// 모듈 정보
|
||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2') {
|
||||
// module format 0.2
|
||||
$module_info->title = $xml_obj->title->body;
|
||||
$module_info->description = $xml_obj->description->body;
|
||||
$module_info->version = $xml_obj->version->body;
|
||||
$module_info->homepage = $xml_obj->link->body;
|
||||
$module_info->category = $xml_obj->category->body;
|
||||
if(!$module_info->category) $module_info->category = 'service';
|
||||
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$module_info->license = $xml_obj->license->body;
|
||||
$module_info->license_link = $xml_obj->license->attrs->link;
|
||||
|
||||
// 작성자 정보
|
||||
$module_info->title = $xml_obj->title->body;
|
||||
$module_info->version = $xml_obj->attrs->version;
|
||||
$module_info->category = $xml_obj->attrs->category;
|
||||
if(!$module_info->category) $module_info->category = 'service';
|
||||
$module_info->author->name = $xml_obj->author->name->body;
|
||||
$module_info->author->email_address = $xml_obj->author->attrs->email_address;
|
||||
$module_info->author->homepage = $xml_obj->author->attrs->link;
|
||||
$module_info->author->date = $xml_obj->author->attrs->date;
|
||||
$module_info->author->description = $xml_obj->author->description->body;
|
||||
if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
|
||||
else $author_list = $xml_obj->author;
|
||||
|
||||
// history
|
||||
if(!is_array($xml_obj->history->author)) $history[] = $xml_obj->history->author;
|
||||
else $history = $xml_obj->history->author;
|
||||
foreach($author_list as $author) {
|
||||
unset($author_obj);
|
||||
$author_obj->name = $author->name->body;
|
||||
$author_obj->email_address = $author->attrs->email_address;
|
||||
$author_obj->homepage = $author->attrs->link;
|
||||
$module_info->author[] = $author_obj;
|
||||
}
|
||||
|
||||
foreach($history as $item) {
|
||||
unset($obj);
|
||||
$obj->name = $item->name->body;
|
||||
$obj->email_address = $item->attrs->email_address;
|
||||
$obj->homepage = $item->attrs->link;
|
||||
$obj->date = $item->attrs->date;
|
||||
$obj->description = $item->description->body;
|
||||
$module_info->history[] = $obj;
|
||||
} else {
|
||||
// module format 0.1
|
||||
$module_info->title = $xml_obj->title->body;
|
||||
$module_info->description = $xml_obj->author->description->body;
|
||||
$module_info->version = $xml_obj->attrs->version;
|
||||
$module_info->category = $xml_obj->attrs->category;
|
||||
if(!$module_info->category) $module_info->category = 'service';
|
||||
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$author_obj->name = $xml_obj->author->name->body;
|
||||
$author_obj->email_address = $xml_obj->author->attrs->email_address;
|
||||
$author_obj->homepage = $xml_obj->author->attrs->link;
|
||||
$module_info->author[] = $author_obj;
|
||||
}
|
||||
|
||||
// history
|
||||
if($xml_obj->history) {
|
||||
if(!is_array($xml_obj->history)) $history[] = $xml_obj->history;
|
||||
else $history = $xml_obj->history;
|
||||
|
||||
foreach($history as $item) {
|
||||
unset($obj);
|
||||
|
||||
if($item->author) {
|
||||
(!is_array($item->author)) ? $obj->author_list[] = $item->author : $obj->author_list = $item->author;
|
||||
|
||||
foreach($obj->author_list as $author) {
|
||||
unset($author_obj);
|
||||
$author_obj->name = $author->name->body;
|
||||
$author_obj->email_address = $author->attrs->email_address;
|
||||
$author_obj->homepage = $author->attrs->link;
|
||||
$obj->author[] = $author_obj;
|
||||
}
|
||||
}
|
||||
|
||||
$obj->name = $item->name->body;
|
||||
$obj->email_address = $item->attrs->email_address;
|
||||
$obj->homepage = $item->attrs->link;
|
||||
$obj->version = $item->attrs->version;
|
||||
$obj->date = $item->attrs->date;
|
||||
$obj->description = $item->description->body;
|
||||
|
||||
if($item->log) {
|
||||
(!is_array($item->log)) ? $obj->log[] = $item->log : $obj->log = $item->log;
|
||||
|
||||
foreach($obj->log as $log) {
|
||||
$obj->logs[] = $log->body;
|
||||
}
|
||||
}
|
||||
|
||||
$module_info->history[] = $obj;
|
||||
}
|
||||
}
|
||||
|
||||
// action 정보를 얻어서 admin_index를 추가
|
||||
|
|
|
|||
|
|
@ -13,24 +13,76 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->author}</th>
|
||||
<td><a href="mailto:{$module_info->author->email_address}">{$module_info->author->name}</a></td>
|
||||
<td class="blue">
|
||||
<!--@foreach($module_info->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@if($module_info->homepage)-->
|
||||
<tr>
|
||||
<th scope="row">{$lang->homepage}</th>
|
||||
<td><a href="{$module_info->author->homepage}" onclick="window.open(this.href);return false;">{$module_info->author->homepage}</a></td>
|
||||
<td class="blue"><a href="{$module_info->homepage}" onclick="window.open(this.href);return false;">{$module_info->homepage}</a></td>
|
||||
</tr>
|
||||
<!--@endif-->
|
||||
<tr>
|
||||
<th scope="row">{$lang->regdate}</th>
|
||||
<td>{$module_info->author->date}</td>
|
||||
<td>{zdate($module_info->date, 'Y-m-d')}</td>
|
||||
</tr>
|
||||
<!--@if($module_info->license || $module_info->license_link)-->
|
||||
<tr>
|
||||
<th scope="row">{$lang->module_license}</th>
|
||||
<td>
|
||||
{nl2br(trim($module_info->license))}
|
||||
<!--@if($addon_info->license_link)-->
|
||||
<p><a href="{$module_info->license_link}" onclick="window.close(); return false;">{$module_info->license_link}</a></p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endif-->
|
||||
<tr>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>{nl2br(trim($module_info->author->description))}</td>
|
||||
<td>{nl2br(trim($module_info->description))}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<!--@if($module_info->history)-->
|
||||
<div id="popHistoryHeadder">
|
||||
<h3>{$lang->module_history}</h3>
|
||||
</div>
|
||||
|
||||
<div id="popHistoryBody">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<col width="100" />
|
||||
<col />
|
||||
|
||||
<!--@foreach($module_info->history as $history)-->
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{$history->version}<br />
|
||||
{$history->date}
|
||||
</th>
|
||||
<td>
|
||||
<!--@foreach($history->author as $author)-->
|
||||
<p>{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a> / <a href="mailto:{$author->email_address}">{$author->email_address}</a>)</p>
|
||||
<!--@endforeach-->
|
||||
<!--@if($addon_info->description)-->
|
||||
<p>{nl2br(trim($history->description))}</p>
|
||||
<!--@endif-->
|
||||
<!--@if($history->logs)-->
|
||||
<ul>
|
||||
<!--@foreach($history->logs as $log)--><li>{$log}</li><!--@endforeach-->
|
||||
</ul>
|
||||
<!--@endif-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endforeach-->
|
||||
</table>
|
||||
</div>
|
||||
<!--@endif-->
|
||||
|
||||
<div id="popFooter" class="tCenter gap1">
|
||||
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -45,12 +45,16 @@
|
|||
<!--@if($val->admin_index_act)-->
|
||||
<a href="{getUrl('act',$val->admin_index_act)}" title="{trim($val->author->description)}">{$val->title}</a> ({$val->module})
|
||||
<!--@else-->
|
||||
<span title="{trim($val->author->description)}">{$val->title}</span> ({$val->module})
|
||||
<span title="{trim($val->description)}">{$val->title}</span> ({$val->module})
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="tahoma">{$val->version}</td>
|
||||
<td><a href="{$val->author->homepage}" onclick="window.open(this.href);return false;">{$val->author->name}</a></td>
|
||||
<td class="tahoma">{$val->author->date}</td>
|
||||
<td>
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->name}</a>
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td class="tahoma">{zdate($val->date, 'Y-m-d')}</td>
|
||||
<td class="tahoma <!--@if($val->created_table_count != $val->table_count)-->red<!--@end-->">
|
||||
{$val->created_table_count}/{$val->table_count}
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue