mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 16:49:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1346 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6bb48002d7
commit
60113ffbc1
6 changed files with 64 additions and 30 deletions
|
|
@ -357,5 +357,28 @@
|
||||||
$output = executeQuery('document.getCategoryDocumentCount', $args);
|
$output = executeQuery('document.getCategoryDocumentCount', $args);
|
||||||
return (int)$output->data->count;
|
return (int)$output->data->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 월별 글 보관현황을 가져옴
|
||||||
|
**/
|
||||||
|
function getgetMonthlyArchivedList($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('document.getMonthlyArchivedList', $args);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
if(!is_array($output->data)) $output->data = array($output->data);
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
15
modules/document/queries/getMonthlyArchivedList.xml
Normal file
15
modules/document/queries/getMonthlyArchivedList.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<query id="getMonthlyArchivedList" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="documents" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="substring(regdate,1,6)" alias="month"/>
|
||||||
|
<column name="count(*)" alias="count" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||||
|
</conditions>
|
||||||
|
<groups>
|
||||||
|
<group column="substring(regdate,1,6)" />
|
||||||
|
</groups>
|
||||||
|
</query>
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class tag_list
|
* @class archive_list
|
||||||
* @author zero (zero@nzeo.com)
|
* @author zero (zero@nzeo.com)
|
||||||
* @brief 태그 목록 출력
|
* @brief 보관현황 목록 출력
|
||||||
* @version 0.1
|
* @version 0.1
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class tag_list extends PluginHandler {
|
class archive_list extends PluginHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 플러그인의 실행 부분
|
* @brief 플러그인의 실행 부분
|
||||||
|
|
@ -17,23 +17,20 @@
|
||||||
function proc($args) {
|
function proc($args) {
|
||||||
// 플러그인 자체적으로 설정한 변수들을 체크
|
// 플러그인 자체적으로 설정한 변수들을 체크
|
||||||
$title = $args->title;
|
$title = $args->title;
|
||||||
$list_count = (int)$args->list_count;
|
|
||||||
if(!$list_count) $list_count = 20;
|
|
||||||
$mid_list = explode(",",$args->mid_list);
|
$mid_list = explode(",",$args->mid_list);
|
||||||
|
|
||||||
// TagModel::getTagList()를 이용하기 위한 변수 정리
|
// DocumentModel::getMonthlyArchivedList()를 이용하기 위한 변수 정리
|
||||||
$obj->mid = $mid_list;
|
$obj->mid = $mid_list;
|
||||||
$obj->list_count = $list_count;
|
|
||||||
|
|
||||||
// tag 모듈의 model 객체를 받아서 getTagList() method를 실행
|
// document 모듈의 model 객체를 받아서 getMonthlyArchivedList() method를 실행
|
||||||
$oTagModel = &getModel('tag');
|
$oDocumentModel = &getModel('document');
|
||||||
$output = $oTagModel->getTagList($obj);
|
$output = $oDocumentModel->getgetMonthlyArchivedList($obj);
|
||||||
|
|
||||||
// 템플릿 파일에서 사용할 변수들을 세팅
|
// 템플릿 파일에서 사용할 변수들을 세팅
|
||||||
if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0];
|
if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0];
|
||||||
|
|
||||||
$plugin_info->title = $title;
|
$plugin_info->title = $title;
|
||||||
$plugin_info->tag_list = $output->data;
|
$plugin_info->archive_list = $output->data;
|
||||||
|
|
||||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
||||||
$plugin_info->width = trim($matches[3][0]);
|
$plugin_info->width = trim($matches[3][0]);
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,18 @@
|
||||||
<!--%import("normal/style.css")-->
|
<!--%import("normal/style.css")-->
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<div class="tag_list_{$colorset}" style="width:100%">
|
<div class="archive_list_{$colorset}" style="width:100%">
|
||||||
<div class="tag_list_box">
|
<div class="archive_list_box">
|
||||||
|
|
||||||
<!--@if($plugin_info->title)-->
|
<!--@if($plugin_info->title)-->
|
||||||
<div class="title_box">
|
<div class="title_box">
|
||||||
<div class="title">{$plugin_info->title}</div>
|
<div class="title">{$plugin_info->title}</div>
|
||||||
</div>
|
</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
<div class="archive_box">
|
||||||
<div class="tag_box">
|
<!--@foreach($plugin_info->archive_list as $val)-->
|
||||||
<!--@foreach($plugin_info->tag_list as $val)-->
|
<div class="archive">
|
||||||
<div class="tag">
|
<a href="{getUrl('mid',$mid,'search_target','regdate','search_keyword',$val->month)}">{zdate($val->month,'Y. m')} ({$val->count})</a>
|
||||||
<a href="{getUrl('mid',$mid,'search_target','tag','search_keyword',$val->tag)}">{cut_str($val->tag,15,'...')}</a>
|
|
||||||
</div>
|
</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,51 +1,51 @@
|
||||||
.tag_list_normal {
|
.archive_list_normal {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box {
|
.archive_list_normal .archive_list_box {
|
||||||
margin-bottom:5px;
|
margin-bottom:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .title_box {
|
.archive_list_normal .archive_list_box .title_box {
|
||||||
padding:5px;
|
padding:5px;
|
||||||
height:14px;
|
height:14px;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
color:#888888;
|
color:#888888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .title_box .title {
|
.archive_list_normal .archive_list_box .title_box .title {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
height:14px;
|
height:14px;
|
||||||
float:left;
|
float:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .tag_box {
|
.archive_list_normal .archive_list_box .archive_box {
|
||||||
padding:5px;
|
padding:5px;
|
||||||
clear:both;
|
clear:both;
|
||||||
border:3px solid #EEEEEE;
|
border:3px solid #EEEEEE;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .tag {
|
.archive_list_normal .archive_list_box .archive {
|
||||||
float:left;
|
float:left;
|
||||||
margin-right:5px;
|
margin-right:5px;
|
||||||
color:#AAAAAA;
|
color:#AAAAAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .tag A {
|
.archive_list_normal .archive_list_box .archive A {
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
color:#555555;
|
color:#555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .tag A:hover {
|
.archive_list_normal .archive_list_box .archive A:hover {
|
||||||
text-decoration:underline;
|
text-decoration:underline;
|
||||||
color:#000000;
|
color:#000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .tag A:visited {
|
.archive_list_normal .archive_list_box .archive A:visited {
|
||||||
color:#AAAAAA;
|
color:#AAAAAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list_normal .tag_list_box .tag .tag A {
|
.archive_list_normal .archive_list_box .archive .archive A {
|
||||||
font-size:7pt;
|
font-size:7pt;
|
||||||
font-family:tahoma;
|
font-family:tahoma;
|
||||||
color:#AAAAAA;
|
color:#AAAAAA;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<skin>
|
<skin>
|
||||||
<title xml:lang="ko">태그 목록 출력</title>
|
<title xml:lang="ko">월별 보관 현황 목록 출력</title>
|
||||||
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||||
<name xml:lang="ko">제로</name>
|
<name xml:lang="ko">제로</name>
|
||||||
<description xml:lang="ko">태그 목록을 출력합니다.</description>
|
<description xml:lang="ko">월별 보관 현황 목록을 출력합니다.</description>
|
||||||
</maker>
|
</maker>
|
||||||
<colorset>
|
<colorset>
|
||||||
<color name="normal">
|
<color name="normal">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue