From 5dfec5a0c4065359e1552b9ff2169c24db866182 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 14 Mar 2007 08:23:12 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@419 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- layouts/sample_layout/conf/info.xml | 96 ++++++++++--------- modules/layout/layout.model.php | 8 +- modules/layout/tpl.admin/layout_info.html | 2 +- modules/plugin/plugin.model.php | 9 +- .../plugin/tpl.admin/plugin_make_code.html | 3 +- plugins/newest_document/conf/info.xml | 89 ++++++++++------- 6 files changed, 118 insertions(+), 89 deletions(-) diff --git a/layouts/sample_layout/conf/info.xml b/layouts/sample_layout/conf/info.xml index 93ec3819e..a29fe5728 100644 --- a/layouts/sample_layout/conf/info.xml +++ b/layouts/sample_layout/conf/info.xml @@ -1,49 +1,53 @@ - 견본 레이아웃 - sample layout - - 제로 - zero - - 견본 레이아웃입니다. - 가장 기본적인 기능으로 이루어져 있습니다. - - sample layout - - - - 상단 제목 - top title - text - - - 메인 메뉴 명 - main_menu_name - text - - - 컬러셋 - colorset - select - - red - blue - green - rightred - - - - - - 주메뉴 - main menu - 2 - - - 하단 메뉴 - bottom menu - 1 - - + 견본 레이아웃 + sample layout + + 제로 + zero + + 견본 레이아웃입니다. + 가장 기본적인 기능으로 이루어져 있습니다. + + sample layout + + + + 상단 제목 + top title + text + + + 메인 메뉴 명 + main_menu_name + text + + + 컬러셋 + colorset + select + + 적색 + red + red + + + 청색 + blue + blue + + + + + + 주메뉴 + main menu + 2 + + + 하단 메뉴 + bottom menu + 1 + + diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index b48b1c7cf..d8d50f189 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -136,23 +136,23 @@ $buff .= sprintf('$layout_info->extra_var_count = "%s";', $extra_var_count); for($i=0;$i<$extra_var_count;$i++) { unset($var); + unset($options); $var = $extra_vars[$i]; $buff .= sprintf('$layout_info->extra_var->%s->name = "%s";', $var->attrs->id, $var->name->body); $buff .= sprintf('$layout_info->extra_var->%s->type = "%s";', $var->attrs->id, $var->type->body); $buff .= sprintf('$layout_info->extra_var->%s->value = $vars->%s;', $var->attrs->id, $var->attrs->id); - $options = $var->options->value; + $options = $var->options; if(!$options) continue; + if(!is_array($options)) $options = array($options); $options_count = count($options); for($i=0;$i<$options_count;$i++) { - $buff .= sprintf('$layout_info->extra_var->%s->options[] = "%s";', $var->attrs->id, $options[$i]->body); - + $buff .= sprintf('$layout_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->id, $options[$i]->value->body, $options[$i]->name->body); } } - // 메뉴 if(!is_array($xml_obj->menus->menu)) $menus[] = $xml_obj->menus->menu; else $menus = $xml_obj->menus->menu; diff --git a/modules/layout/tpl.admin/layout_info.html b/modules/layout/tpl.admin/layout_info.html index a2ddaf0bd..22e199aeb 100644 --- a/modules/layout/tpl.admin/layout_info.html +++ b/modules/layout/tpl.admin/layout_info.html @@ -59,7 +59,7 @@ diff --git a/modules/plugin/plugin.model.php b/modules/plugin/plugin.model.php index f74741e68..b77ee9927 100644 --- a/modules/plugin/plugin.model.php +++ b/modules/plugin/plugin.model.php @@ -70,6 +70,7 @@ $cache_file = sprintf('./files/cache/plugin/%s.cache.php', $plugin); if(file_exists($cache_file)&&filectime($cache_file)>filectime($xml_file)) { include $cache_file; + debugPrint($plugin_info); return $plugin_info; } @@ -103,20 +104,22 @@ $buff .= sprintf('$plugin_info->extra_var_count = "%s";', $extra_var_count); for($i=0;$i<$extra_var_count;$i++) { unset($var); + unset($options); $var = $extra_vars[$i]; $buff .= sprintf('$plugin_info->extra_var->%s->name = "%s";', $var->attrs->id, $var->name->body); $buff .= sprintf('$plugin_info->extra_var->%s->type = "%s";', $var->attrs->id, $var->type->body); $buff .= sprintf('$plugin_info->extra_var->%s->value = $vars->%s;', $var->attrs->id, $var->attrs->id); - $options = $var->options->value; + $options = $var->options; if(!$options) continue; + if(!is_array($options)) $options = array($options); $options_count = count($options); for($i=0;$i<$options_count;$i++) { - $buff .= sprintf('$plugin_info->extra_var->%s->options[] = "%s";', $var->attrs->id, $options[$i]->body); - + $buff .= sprintf('$plugin_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->id, $options[$i]->value->body, $options[$i]->name->body); } + } $buff = ''; diff --git a/modules/plugin/tpl.admin/plugin_make_code.html b/modules/plugin/tpl.admin/plugin_make_code.html index 15ac5f22e..a6ffb3510 100644 --- a/modules/plugin/tpl.admin/plugin_make_code.html +++ b/modules/plugin/tpl.admin/plugin_make_code.html @@ -20,9 +20,10 @@ + diff --git a/plugins/newest_document/conf/info.xml b/plugins/newest_document/conf/info.xml index 1ac8ca28a..6d1a95b99 100644 --- a/plugins/newest_document/conf/info.xml +++ b/plugins/newest_document/conf/info.xml @@ -1,37 +1,58 @@ - 최근 문서 - newest document - - 제로 - zero - 최근 문서 (document)를 출력하는 플러그인입니다. - display newest document - - - - 제목 - title - text - - - 정렬 방법 - order type - select - - regdate - last update - - - - 목록수 - list_count - text - - - 대상 모듈 - target modules - module_list - - + 최근 문서 + newest document + + 제로 + zero + 최근 문서 (document)를 출력하는 플러그인입니다. + display newest document + + + + 제목 + title + text + + + 정렬 대상 + order target + select + + 시간순 + regdate + list_order + + + 업데이트순 + last update + update_order + + + + 정렬 방법 + order type + select + + 내림차순 + desc + desc + + + 올림차순 + asc + asc + + + + 목록수 + list_count + text + + + 대상 모듈 + target modules + module_list + +