mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#468 관련 애드온 group 태그 지원
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4169 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e11657427e
commit
09095c5069
2 changed files with 43 additions and 20 deletions
|
|
@ -123,32 +123,38 @@
|
|||
|
||||
if($xml_obj->extra_vars) {
|
||||
// 확장변수를 정리
|
||||
if(!is_array($xml_obj->extra_vars->var)) $extra_vars[] = $xml_obj->extra_vars->var;
|
||||
else $extra_vars = $xml_obj->extra_vars->var;
|
||||
$extra_var_groups = $xml_obj->extra_vars->group;
|
||||
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
||||
if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
|
||||
foreach($extra_var_groups as $group) {
|
||||
$extra_vars = $group->var;
|
||||
if(!is_array($group->var)) $extra_vars = array($group->var);
|
||||
|
||||
foreach($extra_vars as $key => $val) {
|
||||
unset($obj);
|
||||
if(!$val->type->body) { $val->type->body = 'text'; }
|
||||
foreach($extra_vars as $key => $val) {
|
||||
unset($obj);
|
||||
if(!$val->type->body) { $val->type->body = 'text'; }
|
||||
|
||||
$obj->name = $val->attrs->name;
|
||||
$obj->title = $val->title->body;
|
||||
$obj->type = $val->type->body;
|
||||
$obj->description = $val->description->body;
|
||||
$obj->value = $extra_vals->{$obj->name};
|
||||
if(strpos($obj->value, '|@|') != false) { $obj->value = explode('|@|', $obj->value); }
|
||||
if($obj->type == 'mid_list' && !is_array($obj->value)) { $obj->value = array($obj->value); }
|
||||
$obj->group = $group->title->body;
|
||||
$obj->name = $val->attrs->name;
|
||||
$obj->title = $val->title->body;
|
||||
$obj->type = $val->type->body;
|
||||
$obj->description = $val->description->body;
|
||||
$obj->value = $extra_vals->{$obj->name};
|
||||
if(strpos($obj->value, '|@|') != false) { $obj->value = explode('|@|', $obj->value); }
|
||||
if($obj->type == 'mid_list' && !is_array($obj->value)) { $obj->value = array($obj->value); }
|
||||
|
||||
// 'select'type에서 option목록을 구한다.
|
||||
if(is_array($val->options)) {
|
||||
$option_count = count($val->options);
|
||||
// 'select'type에서 option목록을 구한다.
|
||||
if(is_array($val->options)) {
|
||||
$option_count = count($val->options);
|
||||
|
||||
for($i = 0; $i < $option_count; $i++) {
|
||||
$obj->options[$i]->title = $val->options[$i]->title->body;
|
||||
$obj->options[$i]->value = $val->options[$i]->value->body;
|
||||
for($i = 0; $i < $option_count; $i++) {
|
||||
$obj->options[$i]->title = $val->options[$i]->title->body;
|
||||
$obj->options[$i]->value = $val->options[$i]->value->body;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$addon_info->extra_vars[] = $obj;
|
||||
$addon_info->extra_vars[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,16 @@
|
|||
</tr>
|
||||
|
||||
<!--@foreach($addon_info->extra_vars as $id => $var)-->
|
||||
|
||||
<!--@if($var->group && ((!$group) || $group != $var->group))-->
|
||||
{@$group = $var->group}
|
||||
</table>
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<col width="100" />
|
||||
<col width="*" />
|
||||
<caption>{$group}</caption>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$var->title}</th>
|
||||
<td>
|
||||
|
|
@ -48,6 +58,13 @@
|
|||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($group)-->
|
||||
</table>
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<col width="100" />
|
||||
<col width="*" />
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{$lang->module}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue