mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-10 14:02:12 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1339 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
16e7a1668f
commit
7de9347ff3
15 changed files with 117 additions and 38 deletions
|
|
@ -461,6 +461,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
@ -508,6 +510,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
|
|||
|
|
@ -414,6 +414,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
@ -461,6 +463,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if(count($output->order)) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
|
|||
|
|
@ -423,6 +423,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
@ -469,6 +471,7 @@
|
|||
$start_count = ($page-1)*$list_count;
|
||||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
|
|
|
|||
|
|
@ -418,6 +418,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
@ -465,6 +467,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
|
|||
|
|
@ -461,6 +461,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
@ -508,6 +510,8 @@
|
|||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@
|
|||
}
|
||||
|
||||
// group 정리
|
||||
$groups = $xml_obj->query->groups->group;
|
||||
if($groups) {
|
||||
$group_list = $xml_obj->query->groups->group;
|
||||
if($group_list) {
|
||||
if(!is_array($group_list)) $group_list = array($group_list);
|
||||
for($i=0;$i<count($group_list);$i++) {
|
||||
$group = $group_list[$i];
|
||||
|
|
@ -244,6 +244,11 @@
|
|||
$buff .= sprintf('$output->page = array("var"=>"%s", "value"=>$args->%s?$args->%s:"%s");%s', $output->page->var, $output->page->var, $output->page->var, $output->list->default,"\n");
|
||||
}
|
||||
|
||||
// group by 정리
|
||||
if($output->groups) {
|
||||
$buff .= sprintf('$output->groups = array("%s");%s', implode('","',$output->groups),"\n");
|
||||
}
|
||||
|
||||
// default check
|
||||
if(count($default_list)) {
|
||||
foreach($default_list as $key => $val) {
|
||||
|
|
|
|||
|
|
@ -163,8 +163,9 @@
|
|||
$args->page_count = $this->page_count; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
// 검색 옵션
|
||||
$args->search_target = trim(Context::get('search_target')); ///< 검색대상
|
||||
$args->search_keyword = trim(Context::get('search_keyword')); ///< 검색어
|
||||
if($args->search_keyword) $args->search_target = "title_content"; ///< 검색 고정
|
||||
if($args->search_keyword && !$args->search_target) $args->search_target = "title_content"; ///< 검색 고정
|
||||
$args->category_srl = $this->category_srl;
|
||||
|
||||
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||
|
|
|
|||
19
modules/tag/queries/getTagList.xml
Normal file
19
modules/tag/queries/getTagList.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<query id="getTagList" action="select">
|
||||
<tables>
|
||||
<table name="tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="tag" />
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
</navigation>
|
||||
<groups>
|
||||
<group column="tag" />
|
||||
</groups>
|
||||
</query>
|
||||
38
modules/tag/tag.model.php
Normal file
38
modules/tag/tag.model.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
* @class tagModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief tag 모듈의 model class
|
||||
**/
|
||||
|
||||
class tagModel extends tag {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 태그 목록을 가져옴
|
||||
* 지정된 모듈의 태그를 개수가 많은 순으로 추출
|
||||
**/
|
||||
function getTagList($obj) {
|
||||
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->list_count = $obj->list_count;
|
||||
|
||||
$output = executeQuery('tag.getTagList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
$title = $args->title;
|
||||
$order_target = $args->order_target;
|
||||
$order_type = $args->order_type;
|
||||
$list_count = (int)$args->list_order;
|
||||
$list_count = (int)$args->list_count;
|
||||
if(!$list_count) $list_count = 5;
|
||||
$mid_list = explode(",",$args->mid_list);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
$title = $args->title;
|
||||
$order_target = $args->order_target;
|
||||
$order_type = $args->order_type;
|
||||
$list_count = (int)$args->list_order;
|
||||
$list_count = (int)$args->list_count;
|
||||
if(!$list_count) $list_count = 5;
|
||||
$mid_list = explode(",",$args->mid_list);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
$title = $args->title;
|
||||
$order_target = $args->order_target;
|
||||
$order_type = $args->order_type;
|
||||
$list_count = (int)$args->list_order;
|
||||
$list_count = (int)$args->list_count;
|
||||
if(!$list_count) $list_count = 5;
|
||||
$mid_list = explode(",",$args->mid_list);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
<!--%import("normal/style.css")-->
|
||||
<!--@end-->
|
||||
|
||||
<div class="newest_trackback_default_{$colorset}" style="width:100%">
|
||||
<div class="newest_trackback_default_box">
|
||||
<div class="newest_tag_default_{$colorset}" style="width:100%">
|
||||
<div class="newest_tag_default_box">
|
||||
|
||||
<!--@if($plugin_info->title)-->
|
||||
<div class="title_box">
|
||||
|
|
@ -16,11 +16,10 @@
|
|||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<div class="trackback_box">
|
||||
<!--@foreach($plugin_info->trackback_list as $val)-->
|
||||
<div class="trackback">
|
||||
<a href="{getUrl('','document_srl',$val->document_srl)}#trackback_{$val->trackback_srl}">{cut_str($val->title,15,'...')}</a>
|
||||
- {cut_str($val->blog_name,10,'...')}
|
||||
<div class="tag_box">
|
||||
<!--@foreach($plugin_info->tag_list as $val)-->
|
||||
<div class="tag">
|
||||
<a href="{getUrl('mid',$mid,'search_target','tag','search_keyword',$val->tag)}">{cut_str($val->tag,15,'...')} ({$val->count})</a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
.newest_trackback_default_normal {
|
||||
.newest_tag_default_normal {
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box {
|
||||
.newest_tag_default_normal .newest_tag_default_box {
|
||||
margin-bottom:5px;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .title_box {
|
||||
.newest_tag_default_normal .newest_tag_default_box .title_box {
|
||||
padding:5px;
|
||||
height:14px;
|
||||
overflow:hidden;
|
||||
color:#888888;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .title_box .title {
|
||||
.newest_tag_default_normal .newest_tag_default_box .title_box .title {
|
||||
font-weight:bold;
|
||||
height:14px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .title_box .more A {
|
||||
.newest_tag_default_normal .newest_tag_default_box .title_box .more A {
|
||||
float:right;
|
||||
color:#AAAAAA;
|
||||
text-decoration:none;
|
||||
|
|
@ -26,47 +26,48 @@
|
|||
font-weight:bold;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback_box {
|
||||
padding:5px 3px 3px 1px;
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag_box {
|
||||
padding:5px;
|
||||
clear:both;
|
||||
border:3px solid #EEEEEE;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback {
|
||||
padding:0px 0px 5px 5px;
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag {
|
||||
float:left;
|
||||
margin-right:5px;
|
||||
color:#AAAAAA;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback A {
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag A {
|
||||
text-decoration:none;
|
||||
color:#555555;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback A:hover {
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag A:hover {
|
||||
text-decoration:underline;
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback A:visited {
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag A:visited {
|
||||
color:#AAAAAA;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback .trackback A {
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag .tag A {
|
||||
font-size:7pt;
|
||||
font-family:tahoma;
|
||||
color:#AAAAAA;
|
||||
letter-spacing:-1px;
|
||||
}
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .trackback .writer {
|
||||
.newest_tag_default_normal .newest_tag_default_box .tag .writer {
|
||||
font-size:9pt;
|
||||
font-family:tahoma;
|
||||
color:#AAAAAA;
|
||||
}
|
||||
|
||||
|
||||
.newest_trackback_default_normal .newest_trackback_default_box .regdate {
|
||||
.newest_tag_default_normal .newest_tag_default_box .regdate {
|
||||
color:#AAAAAA;
|
||||
font-size:8pt;
|
||||
font-family:tahoma;
|
||||
|
|
|
|||
|
|
@ -17,26 +17,23 @@
|
|||
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;
|
||||
$list_count = (int)$args->list_count;
|
||||
if(!$list_count) $list_count = 20;
|
||||
$mid_list = explode(",",$args->mid_list);
|
||||
|
||||
// TrackbackModel::getTrackbackList()를 이용하기 위한 변수 정리
|
||||
// TagModel::getTagList()를 이용하기 위한 변수 정리
|
||||
$obj->mid = $mid_list;
|
||||
$obj->sort_index = $order_target;
|
||||
$obj->list_count = $list_count;
|
||||
|
||||
// trackback 모듈의 model 객체를 받아서 getTrackbackList() method를 실행
|
||||
$oTrackbackModel = &getModel('trackback');
|
||||
$output = $oTrackbackModel->getNewestTrackbackList($obj);
|
||||
// tag 모듈의 model 객체를 받아서 getTagList() method를 실행
|
||||
$oTagModel = &getModel('tag');
|
||||
$output = $oTagModel->getTagList($obj);
|
||||
|
||||
// 템플릿 파일에서 사용할 변수들을 세팅
|
||||
if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0];
|
||||
|
||||
$plugin_info->title = $title;
|
||||
$plugin_info->trackback_list = $output->data;
|
||||
$plugin_info->tag_list = $output->data;
|
||||
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
||||
$plugin_info->width = trim($matches[3][0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue