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@703 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f01485af09
commit
e93576f6b6
11 changed files with 62 additions and 12 deletions
|
|
@ -767,6 +767,7 @@
|
||||||
// className, style attribute를 구해 놓음
|
// className, style attribute를 구해 놓음
|
||||||
$className = $vars->class;
|
$className = $vars->class;
|
||||||
$style = $vars->style;
|
$style = $vars->style;
|
||||||
|
unset($vars->module_srl);
|
||||||
unset($vars->class);
|
unset($vars->class);
|
||||||
unset($vars->style);
|
unset($vars->style);
|
||||||
unset($vars->src);
|
unset($vars->src);
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@
|
||||||
if(!$oPlugin) return;
|
if(!$oPlugin) return;
|
||||||
|
|
||||||
// 플러그인 실행
|
// 플러그인 실행
|
||||||
$output = $oPlugin->proc($args);
|
return $oPlugin->proc($args);
|
||||||
return $output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,8 @@
|
||||||
$buff = sprintf('sprintf("%s like \'%%s%%%%\' ", $this->addQuotes($args->%s))', $column, $var);
|
$buff = sprintf('sprintf("%s like \'%%s%%%%\' ", $this->addQuotes($args->%s))', $column, $var);
|
||||||
break;
|
break;
|
||||||
case 'in' :
|
case 'in' :
|
||||||
$buff = sprintf('sprintf("%s in (%%s) ", $this->addQuotes($args->%s))', $column, $var);
|
//$buff = sprintf('sprintf("%s in (%%s) ", $this->addQuotes($args->%s))', $column, $var);
|
||||||
|
$buff = sprintf('sprintf("%s in (%%s) ", $args->%s)', $column, $var);
|
||||||
break;
|
break;
|
||||||
case 'notnull' :
|
case 'notnull' :
|
||||||
case 'null' :
|
case 'null' :
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,6 @@
|
||||||
</div>
|
</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<div plugin="newest_document" title="safs" order_target="list_order" order_type="desc" list_count="20" mid_list="board"></div>
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
{$content}
|
{$content}
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,17 @@
|
||||||
|
|
||||||
if(!in_array($obj->sort_index, array('list_order', 'update_order'))) $obj->sort_index = 'list_order';
|
if(!in_array($obj->sort_index, array('list_order', 'update_order'))) $obj->sort_index = 'list_order';
|
||||||
|
|
||||||
// 변수 설정
|
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
|
||||||
$args->module_srl = $obj->module_srl;
|
if($obj->mid) {
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
|
||||||
|
unset($obj->mid);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
|
||||||
|
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
|
||||||
|
else $args->module_srl = $obj->module_srl;
|
||||||
|
|
||||||
$args->category_srl = $obj->category_srl?$obj->category_srl:'';
|
$args->category_srl = $obj->category_srl?$obj->category_srl:'';
|
||||||
|
|
||||||
$args->sort_index = $obj->sort_index;
|
$args->sort_index = $obj->sort_index;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<column name="*" />
|
<column name="*" />
|
||||||
</columns>
|
</columns>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" />
|
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||||
<condition operation="equal" column="category_srl" var="category_srl" pipe="and" />
|
<condition operation="equal" column="category_srl" var="category_srl" pipe="and" />
|
||||||
<group pipe="and">
|
<group pipe="and">
|
||||||
<condition operation="like" column="title" var="s_title" />
|
<condition operation="like" column="title" var="s_title" />
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ function display_gallery_image(obj, is_first_display) {
|
||||||
// 이미지 표시
|
// 이미지 표시
|
||||||
var target_image = xGetElementById("slide_gallery_main_image_"+obj.srl);
|
var target_image = xGetElementById("slide_gallery_main_image_"+obj.srl);
|
||||||
|
|
||||||
target_image.style.margin = "0px;";
|
|
||||||
target_image.style.marginLeft = x+"px";
|
target_image.style.marginLeft = x+"px";
|
||||||
|
|
||||||
target_image.src = obj.image.src;
|
target_image.src = obj.image.src;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
<td>{$val->download_count}</td>
|
<td>{$val->download_count}</td>
|
||||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||||
<td>{$val->ipaddress}</td>
|
<td>{$val->ipaddress}</td>
|
||||||
<td><a href="#" onclick="window.open('./?document_srl={$val->document_srl}');return false">{$lang->cmd_move}</a></td>
|
<td><a href="#" onclick="window.open('./?document_srl={$val->upload_target_srl}');return false">{$lang->cmd_move}</a></td>
|
||||||
<td><a href="{$val->download_url}">{$lang->cmd_download}</a></td>
|
<td><a href="{$val->download_url}">{$lang->cmd_download}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,23 @@
|
||||||
return $mid_list;
|
return $mid_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief mid 목록에 대응하는 module_srl을 배열로 return
|
||||||
|
**/
|
||||||
|
function getModuleSrlByMid($mid) {
|
||||||
|
if(is_array($mid)) $mid = "'".implode("','",$mid)."'";
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
$args->mid = $mid;
|
||||||
|
$output = $oDB->executeQuery('module.getModuleSrlByMid', $args);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
$list = $output->data;
|
||||||
|
if(!$list) return;
|
||||||
|
if(!is_array($list)) $list = array($list);
|
||||||
|
foreach($list as $key => $val) $module_srl_list[] = $val->module_srl;
|
||||||
|
return $module_srl_list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 특정 모듈의 스킨의 정보를 구해옴
|
* @brief 특정 모듈의 스킨의 정보를 구해옴
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
11
modules/module/queries/getModuleSrlByMid.xml
Normal file
11
modules/module/queries/getModuleSrlByMid.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<query id="getModuleSrlByMid" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="modules" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="module_srl" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="in" column="mid" var="mid" notnull="notnull" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
|
|
@ -12,11 +12,26 @@
|
||||||
/**
|
/**
|
||||||
* @brief 플러그인의 실행 부분
|
* @brief 플러그인의 실행 부분
|
||||||
* ./plugins/플러그인/conf/info.xml에 선언한 extra_vars를 args로 받는다
|
* ./plugins/플러그인/conf/info.xml에 선언한 extra_vars를 args로 받는다
|
||||||
|
* 결과를 만든후 return 해주어야 한다
|
||||||
**/
|
**/
|
||||||
function proc($args) {
|
function proc($args) {
|
||||||
|
// 플러그인 자체적으로 설정한 변수들을 체크
|
||||||
|
$title = $args->title;
|
||||||
|
$order_target = $args->order_target;
|
||||||
|
$order_type = $args->order_type;
|
||||||
|
$list_count = (int)$args->list_order;
|
||||||
|
if(!$list_count) $list_count = 5;
|
||||||
|
$mid_list = explode(",",$args->mid_list);
|
||||||
|
|
||||||
return 12;
|
// DocumentModel::getDocumentList()를 이용하기 위한 변수 정리
|
||||||
|
$obj->mid = $mid_list;
|
||||||
|
$obj->sort_index = $order_target;
|
||||||
|
$obj->list_count = $list_count;
|
||||||
|
|
||||||
|
$oDocumentModel = &getModel('document');
|
||||||
|
$output = $oDocumentModel->getDocumentList($obj);
|
||||||
|
|
||||||
|
// 템플릿 파일을 지정
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue