mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@420 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5dfec5a0c4
commit
99ca20908e
7 changed files with 50 additions and 8 deletions
|
|
@ -148,8 +148,8 @@
|
||||||
|
|
||||||
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($j=0;$j<$options_count;$j++) {
|
||||||
$buff .= sprintf('$layout_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->id, $options[$i]->value->body, $options[$i]->name->body);
|
$buff .= sprintf('$layout_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->id, $options[$j]->value->body, $options[$j]->name->body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,23 @@
|
||||||
return $module_info;
|
return $module_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DB에 생성된 mid목록을 구해옴
|
||||||
|
**/
|
||||||
|
function getMidList() {
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
$output = $oDB->executeQuery('module.getMidList');
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
$list = $output->data;
|
||||||
|
if(!$list) return;
|
||||||
|
if(!is_array($list)) $list = array($list);
|
||||||
|
foreach($list as $val) {
|
||||||
|
$mid_list[$val->mid] = $val;
|
||||||
|
}
|
||||||
|
return $mid_list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 특정 모듈의 스킨의 정보를 구해옴
|
* @brief 특정 모듈의 스킨의 정보를 구해옴
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
11
modules/module/queries/getMidList.xml
Normal file
11
modules/module/queries/getMidList.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<query id="getMidList" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="modules" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="*" />
|
||||||
|
</columns>
|
||||||
|
<navigation>
|
||||||
|
<index var="sort_index" default="mid" order="asc" />
|
||||||
|
</navigation>
|
||||||
|
</query>
|
||||||
|
|
@ -70,7 +70,6 @@
|
||||||
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,6 +100,7 @@
|
||||||
if(!is_array($xml_obj->extra_vars->var)) $extra_vars[] = $xml_obj->extra_vars->var;
|
if(!is_array($xml_obj->extra_vars->var)) $extra_vars[] = $xml_obj->extra_vars->var;
|
||||||
else $extra_vars = $xml_obj->extra_vars->var;
|
else $extra_vars = $xml_obj->extra_vars->var;
|
||||||
$extra_var_count = count($extra_vars);
|
$extra_var_count = count($extra_vars);
|
||||||
|
|
||||||
$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);
|
||||||
|
|
@ -116,8 +116,8 @@
|
||||||
|
|
||||||
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($j=0;$j<$options_count;$j++) {
|
||||||
$buff .= sprintf('$plugin_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->id, $options[$i]->value->body, $options[$i]->name->body);
|
$buff .= sprintf('$plugin_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->id, $options[$j]->value->body, $options[$j]->name->body);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@
|
||||||
$plugin_info = $oPluginModel->getPluginInfo(Context::get('selected_plugin'));
|
$plugin_info = $oPluginModel->getPluginInfo(Context::get('selected_plugin'));
|
||||||
Context::set('plugin_info', $plugin_info);
|
Context::set('plugin_info', $plugin_info);
|
||||||
|
|
||||||
|
// mid 목록을 가져옴
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$mid_list = $oModuleModel->getMidList();
|
||||||
|
Context::set('mid_list', $mid_list);
|
||||||
|
|
||||||
// 플러그인을 팝업으로 지정
|
// 플러그인을 팝업으로 지정
|
||||||
$this->setLayoutFile('popup_layout');
|
$this->setLayoutFile('popup_layout');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<table border="1" width="400">
|
<table border="1" width="400">
|
||||||
<col width="100" />
|
<col width="100" />
|
||||||
<col width="300" />
|
<col width="300" />
|
||||||
|
|
@ -12,6 +11,7 @@
|
||||||
<!--@foreach($plugin_info->extra_var as $id => $var)-->
|
<!--@foreach($plugin_info->extra_var as $id => $var)-->
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$var->name}</th>
|
<th>{$var->name}</th>
|
||||||
|
|
||||||
<!--@if($var->type == "text")-->
|
<!--@if($var->type == "text")-->
|
||||||
<td><input type="text" name="{$id}" value="{$var->value}" /></td>
|
<td><input type="text" name="{$id}" value="{$var->value}" /></td>
|
||||||
<!--@elseif($var->type == "textarea")-->
|
<!--@elseif($var->type == "textarea")-->
|
||||||
|
|
@ -24,6 +24,15 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
<!--@elseif($var->type == "mid_list")-->
|
||||||
|
<td>
|
||||||
|
<!--@foreach($mid_list as $key => $val)-->
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" value="{$key}" id="chk_mid_list_{$key}" />
|
||||||
|
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
|
||||||
|
</div>
|
||||||
|
<!--@end-->
|
||||||
|
</td>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,10 @@
|
||||||
<name xml:lang="en">list_count</name>
|
<name xml:lang="en">list_count</name>
|
||||||
<type>text</type>
|
<type>text</type>
|
||||||
</var>
|
</var>
|
||||||
<var id="module_srls">
|
<var id="mid_list">
|
||||||
<name xml:lang="ko">대상 모듈</name>
|
<name xml:lang="ko">대상 모듈</name>
|
||||||
<name xml:lang="en">target modules</name>
|
<name xml:lang="en">target modules</name>
|
||||||
<type>module_list</type>
|
<type>mid_list</type>
|
||||||
</var>
|
</var>
|
||||||
</extra_vars>
|
</extra_vars>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue