mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 21:12:15 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@419 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
76aea1928e
commit
5dfec5a0c4
6 changed files with 118 additions and 89 deletions
|
|
@ -27,10 +27,14 @@
|
||||||
<name xml:lang="en">colorset</name>
|
<name xml:lang="en">colorset</name>
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<options>
|
<options>
|
||||||
|
<name xml:lang="ko">적색</name>
|
||||||
|
<name xml:lang="en">red</name>
|
||||||
<value>red</value>
|
<value>red</value>
|
||||||
|
</options>
|
||||||
|
<options>
|
||||||
|
<name xml:lang="ko">청색</name>
|
||||||
|
<name xml:lang="en">blue</name>
|
||||||
<value>blue</value>
|
<value>blue</value>
|
||||||
<value>green</value>
|
|
||||||
<value>rightred</value>
|
|
||||||
</options>
|
</options>
|
||||||
</var>
|
</var>
|
||||||
</extra_vars>
|
</extra_vars>
|
||||||
|
|
|
||||||
|
|
@ -136,23 +136,23 @@
|
||||||
$buff .= sprintf('$layout_info->extra_var_count = "%s";', $extra_var_count);
|
$buff .= sprintf('$layout_info->extra_var_count = "%s";', $extra_var_count);
|
||||||
for($i=0;$i<$extra_var_count;$i++) {
|
for($i=0;$i<$extra_var_count;$i++) {
|
||||||
unset($var);
|
unset($var);
|
||||||
|
unset($options);
|
||||||
$var = $extra_vars[$i];
|
$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->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->type = "%s";', $var->attrs->id, $var->type->body);
|
||||||
$buff .= sprintf('$layout_info->extra_var->%s->value = $vars->%s;', $var->attrs->id, $var->attrs->id);
|
$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(!$options) continue;
|
||||||
|
|
||||||
if(!is_array($options)) $options = array($options);
|
if(!is_array($options)) $options = array($options);
|
||||||
$options_count = count($options);
|
$options_count = count($options);
|
||||||
for($i=0;$i<$options_count;$i++) {
|
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;
|
if(!is_array($xml_obj->menus->menu)) $menus[] = $xml_obj->menus->menu;
|
||||||
else $menus = $xml_obj->menus->menu;
|
else $menus = $xml_obj->menus->menu;
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
<td>
|
<td>
|
||||||
<select name="{$id}">
|
<select name="{$id}">
|
||||||
<!--@foreach($var->options as $key => $val)-->
|
<!--@foreach($var->options as $key => $val)-->
|
||||||
<option value="{$val}" <!--@if($val==$var->value)-->selected="true"<!--@end-->>{$val}</option>
|
<option value="{$key}" <!--@if($key==$var->value)-->selected="true"<!--@end-->>{$val}</option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@
|
||||||
$cache_file = sprintf('./files/cache/plugin/%s.cache.php', $plugin);
|
$cache_file = sprintf('./files/cache/plugin/%s.cache.php', $plugin);
|
||||||
if(file_exists($cache_file)&&filectime($cache_file)>filectime($xml_file)) {
|
if(file_exists($cache_file)&&filectime($cache_file)>filectime($xml_file)) {
|
||||||
include $cache_file;
|
include $cache_file;
|
||||||
|
debugPrint($plugin_info);
|
||||||
return $plugin_info;
|
return $plugin_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,20 +104,22 @@
|
||||||
$buff .= sprintf('$plugin_info->extra_var_count = "%s";', $extra_var_count);
|
$buff .= sprintf('$plugin_info->extra_var_count = "%s";', $extra_var_count);
|
||||||
for($i=0;$i<$extra_var_count;$i++) {
|
for($i=0;$i<$extra_var_count;$i++) {
|
||||||
unset($var);
|
unset($var);
|
||||||
|
unset($options);
|
||||||
$var = $extra_vars[$i];
|
$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->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->type = "%s";', $var->attrs->id, $var->type->body);
|
||||||
$buff .= sprintf('$plugin_info->extra_var->%s->value = $vars->%s;', $var->attrs->id, $var->attrs->id);
|
$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(!$options) continue;
|
||||||
|
|
||||||
if(!is_array($options)) $options = array($options);
|
if(!is_array($options)) $options = array($options);
|
||||||
$options_count = count($options);
|
$options_count = count($options);
|
||||||
for($i=0;$i<$options_count;$i++) {
|
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 = '<?php if(!__ZB5__) exit(); '.$buff.' ?>';
|
$buff = '<?php if(!__ZB5__) exit(); '.$buff.' ?>';
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,10 @@
|
||||||
<td>
|
<td>
|
||||||
<select name="{$id}">
|
<select name="{$id}">
|
||||||
<!--@foreach($var->options as $key => $val)-->
|
<!--@foreach($var->options as $key => $val)-->
|
||||||
<option value="{$val}" <!--@if($val==$var->value)-->selected="true"<!--@end-->>{$val}</option>
|
<option value="{$key}" <!--@if($key==$var->value)-->selected="true"<!--@end-->>{$val}</option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
|
</td>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,34 @@
|
||||||
<name xml:lang="en">title</name>
|
<name xml:lang="en">title</name>
|
||||||
<type>text</type>
|
<type>text</type>
|
||||||
</var>
|
</var>
|
||||||
|
<var id="order_target">
|
||||||
|
<name xml:lang="ko">정렬 대상</name>
|
||||||
|
<name xml:lang="en">order target</name>
|
||||||
|
<type>select</type>
|
||||||
|
<options>
|
||||||
|
<name xml:lang="ko">시간순</name>
|
||||||
|
<name xml:lang="en">regdate</name>
|
||||||
|
<value>list_order</value>
|
||||||
|
</options>
|
||||||
|
<options>
|
||||||
|
<name xml:lang="ko">업데이트순</name>
|
||||||
|
<name xml:lang="en">last update</name>
|
||||||
|
<value>update_order</value>
|
||||||
|
</options>
|
||||||
|
</var>
|
||||||
<var id="order_type">
|
<var id="order_type">
|
||||||
<name xml:lang="ko">정렬 방법</name>
|
<name xml:lang="ko">정렬 방법</name>
|
||||||
<name xml:lang="en">order type</name>
|
<name xml:lang="en">order type</name>
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<options>
|
<options>
|
||||||
<value>regdate</value>
|
<name xml:lang="ko">내림차순</name>
|
||||||
<value>last update</value>
|
<name xml:lang="en">desc</name>
|
||||||
|
<value>desc</value>
|
||||||
|
</options>
|
||||||
|
<options>
|
||||||
|
<name xml:lang="ko">올림차순</name>
|
||||||
|
<name xml:lang="en">asc</name>
|
||||||
|
<value>asc</value>
|
||||||
</options>
|
</options>
|
||||||
</var>
|
</var>
|
||||||
<var id="list_count">
|
<var id="list_count">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue