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@653 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d703b6d15a
commit
ee7a05b344
5 changed files with 49 additions and 4 deletions
|
|
@ -28,11 +28,13 @@
|
|||
* @brief component의 xml정보를 읽음
|
||||
**/
|
||||
function getComponentXmlInfo($component) {
|
||||
$lang_type = Context::getLangType();
|
||||
|
||||
// 요청된 컴포넌트의 xml파일 위치를 구함
|
||||
$component_path = sprintf('%scomponents/%s/', $this->module_path, $component);
|
||||
|
||||
$xml_file = sprintf('%sinfo.xml', $component_path);
|
||||
$cache_file = sprintf('./files/cache/editor/%s.php', $component);
|
||||
$cache_file = sprintf('./files/cache/editor/%s.%s.php', $component, $lang_type);
|
||||
|
||||
// 캐시된 xml파일이 있으면 include 후 정보 return
|
||||
if(file_exists($cache_file) && filectime($cache_file) > filectime($xml_file)) {
|
||||
|
|
@ -46,6 +48,8 @@
|
|||
|
||||
// 정보 정리
|
||||
$xml_info->component_name = $component;
|
||||
$xml_info->version = $xml_doc->component->attrs->version;
|
||||
$xml_info->title = $xml_doc->component->title->body;
|
||||
$xml_info->author->name = $xml_doc->component->author->name->body;
|
||||
$xml_info->author->email_address = $xml_doc->component->author->attrs->email_address;
|
||||
$xml_info->author->link = $xml_doc->component->author->attrs->link;
|
||||
|
|
@ -54,6 +58,8 @@
|
|||
|
||||
$buff = '<?php if(!__ZB5__) exit(); ';
|
||||
$buff .= sprintf('$xml_info->component_name = "%s";', $component);
|
||||
$buff .= sprintf('$xml_info->version = "%s";', $xml_info->version);
|
||||
$buff .= sprintf('$xml_info->title = "%s";', $xml_info->title);
|
||||
$buff .= sprintf('$xml_info->author->name = "%s";', $xml_info->author->name);
|
||||
$buff .= sprintf('$xml_info->author->email_address = "%s";', $xml_info->author->email_address);
|
||||
$buff .= sprintf('$xml_info->author->link = "%s";', $xml_info->author->link);
|
||||
|
|
@ -81,7 +87,7 @@
|
|||
|
||||
FileHandler::writeFile($cache_file, $buff, "w");
|
||||
|
||||
return $xml_doc->component;
|
||||
return $xml_info;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -24,9 +24,12 @@
|
|||
|
||||
$oEditorModel = &getModel('editor');
|
||||
foreach($component_list as $component) {
|
||||
$xml_doc = $oEditorModel->getComponentXmlInfo($component);
|
||||
$list[$component] = $xml_doc = $oEditorModel->getComponentXmlInfo($component);
|
||||
}
|
||||
Context::set('component_list', $component_list);
|
||||
Context::set('component_list', $list);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('admin_index');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,5 +5,12 @@
|
|||
* @brief 위지윅에디터(editor) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->component_name = "컴포넌트";
|
||||
$lang->component_version = "버전";
|
||||
$lang->component_author = "제작자 ";
|
||||
$lang->component_link = "링크";
|
||||
$lang->component_date = "제작일";
|
||||
$lang->component_description = "설명";
|
||||
|
||||
$lang->msg_component_is_not_founded = '%s 에디터 컴포넌트를 찾을 수 없습니다';
|
||||
?>
|
||||
|
|
|
|||
28
modules/editor/tpl/admin_index.html
Normal file
28
modules/editor/tpl/admin_index.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<table border="1">
|
||||
<tr>
|
||||
<th>{$lang->component_name}</th>
|
||||
<th>{$lang->component_version}</th>
|
||||
<th>{$lang->component_author}</th>
|
||||
<th>{$lang->component_link}</th>
|
||||
<th>{$lang->component_date}</th>
|
||||
<th>{$lang->cmd_setup}</th>
|
||||
<th>{$lang->use}</th>
|
||||
<th colspan="2">{$lang->cmd_move}</th>
|
||||
</tr>
|
||||
<!--@foreach($component_list as $component_name => $xml_info)-->
|
||||
<tr>
|
||||
<td rowspan="2">{$xml_info->title}<br />({$component_name})</td>
|
||||
<td rowspan="2">{$xml_info->version}</td>
|
||||
<td><a href="mailto:{$xml_info->author->email_address}">{$xml_info->author->name}</a></td>
|
||||
<td><a href="#" onclick="window.open('{$xml_info->author->link}');return false;">{$xml_info->author->link}</a></td>
|
||||
<td>{$xml_info->author->date}</td>
|
||||
<td rowspan="2">{$lang->cmd_setup}</td>
|
||||
<td rowspan="2">{$lang->use}</td>
|
||||
<td rowspan="2">{$lang->cmd_move_up}</td>
|
||||
<td rowspan="2">{$lang->cmd_move_down}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">{nl2br($xml_info->description)}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
Loading…
Add table
Add a link
Reference in a new issue