mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 23:29:57 +09:00
게시판 모듈에 최신순/업데이트 순 순서를 정할 수 있도록 기능 추가하고 xe시리즈의 스킨에 반영
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1924 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2759bf5363
commit
89d40258bd
8 changed files with 48 additions and 4 deletions
|
|
@ -96,6 +96,20 @@
|
||||||
$args->sort_index = Context::get('sort_index');
|
$args->sort_index = Context::get('sort_index');
|
||||||
$args->order_type = Context::get('order_type');
|
$args->order_type = Context::get('order_type');
|
||||||
|
|
||||||
|
// 스킨에서 설정한 기본 정렬 대상을 구함
|
||||||
|
if(!$args->sort_index) {
|
||||||
|
switch($this->module_info->order_target) {
|
||||||
|
case "updated" :
|
||||||
|
$args->sort_index = "update_order";
|
||||||
|
$args->order_type = "asc";
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
$args->sort_index = "list_order";
|
||||||
|
$args->order_type = "asc";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
// 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||||
$output = $oDocumentModel->getDocumentList($args);
|
$output = $oDocumentModel->getDocumentList($args);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,15 @@
|
||||||
</color>
|
</color>
|
||||||
</colorset>
|
</colorset>
|
||||||
<extra_vars>
|
<extra_vars>
|
||||||
|
<var name="order_target" type="select">
|
||||||
|
<title xml:lang="ko">정렬 대상</title>
|
||||||
|
<title xml:lang="zh-CN">排列顺序</title>
|
||||||
|
<type>select</type>
|
||||||
|
<description xml:lang="ko">등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다.</description>
|
||||||
|
<description xml:lang="zh-CN">可排序文章的顺序。</description>
|
||||||
|
<default>newest</default>
|
||||||
|
<default>updated</default>
|
||||||
|
</var>
|
||||||
<var name="title" type="text">
|
<var name="title" type="text">
|
||||||
<title xml:lang="ko">게시판 제목</title>
|
<title xml:lang="ko">게시판 제목</title>
|
||||||
<title xml:lang="zh-CN">board标题</title>
|
<title xml:lang="zh-CN">board标题</title>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,15 @@
|
||||||
</color>
|
</color>
|
||||||
</colorset>
|
</colorset>
|
||||||
<extra_vars>
|
<extra_vars>
|
||||||
|
<var name="order_target" type="select">
|
||||||
|
<title xml:lang="ko">정렬 대상</title>
|
||||||
|
<title xml:lang="zh-CN">排列顺序</title>
|
||||||
|
<type>select</type>
|
||||||
|
<description xml:lang="ko">등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다.</description>
|
||||||
|
<description xml:lang="zh-CN">可排序文章的顺序。</description>
|
||||||
|
<default>newest</default>
|
||||||
|
<default>updated</default>
|
||||||
|
</var>
|
||||||
<var name="title" type="text">
|
<var name="title" type="text">
|
||||||
<title xml:lang="ko">게시판 제목</title>
|
<title xml:lang="ko">게시판 제목</title>
|
||||||
<title xml:lang="zh-CN">board 标题</title>
|
<title xml:lang="zh-CN">board 标题</title>
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
|
|
||||||
<tr class="bg{($no+1)%2+1}">
|
<tr class="bg{($no+1)%2+1}">
|
||||||
<td class="num"><!--@if($document_srl == $document->document_srl)--><img src="./images/white/iconArrowD8.gif" border="0" /><!--@else-->{$no}<!--@end--></td>
|
|
||||||
|
|
||||||
|
<td rowspan="2" class="num"><!--@if($document_srl == $document->document_srl)--><img src="./images/white/iconArrowD8.gif" border="0" /><!--@else-->{$no}<!--@end--></td>
|
||||||
<!--@if($document->thumbnailExists(100))-->
|
<!--@if($document->thumbnailExists(100))-->
|
||||||
<td rowspan="2" class="thumb">
|
<td rowspan="2" class="thumb">
|
||||||
<a href="{getUrl('','document_srl',$document->document_srl)}" class="thumbnailMedium"><img src="{$document->getThumbnail(100)}" border="0" alt="" /></a>
|
<a href="{getUrl('','document_srl',$document->document_srl)}" class="thumbnailMedium"><img src="{$document->getThumbnail(100)}" border="0" alt="" /></a>
|
||||||
|
|
@ -138,7 +138,7 @@
|
||||||
<td class="date">{$document->getRegdate('Y-m-d')}</td>
|
<td class="date">{$document->getRegdate('Y-m-d')}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="bg{($no+1)%2+1}">
|
<tr class="bg{($no+1)%2+1}">
|
||||||
<td colspan="5" class="summary"><a href="{getUrl('','document_srl',$document->document_srl)}">{$document->getSummary(140)}</a></td>
|
<td colspan="6" class="summary"><a href="{getUrl('','document_srl',$document->document_srl)}">{$document->getSummary(140)}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,15 @@
|
||||||
</color>
|
</color>
|
||||||
</colorset>
|
</colorset>
|
||||||
<extra_vars>
|
<extra_vars>
|
||||||
|
<var name="order_target" type="select">
|
||||||
|
<title xml:lang="ko">정렬 대상</title>
|
||||||
|
<title xml:lang="zh-CN">排列顺序</title>
|
||||||
|
<type>select</type>
|
||||||
|
<description xml:lang="ko">등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다.</description>
|
||||||
|
<description xml:lang="zh-CN">可排序文章的顺序。</description>
|
||||||
|
<default>newest</default>
|
||||||
|
<default>updated</default>
|
||||||
|
</var>
|
||||||
<var name="title" type="text">
|
<var name="title" type="text">
|
||||||
<title xml:lang="ko">게시판 제목</title>
|
<title xml:lang="ko">게시판 제목</title>
|
||||||
<title xml:lang="zh-CN">board 标题</title>
|
<title xml:lang="zh-CN">board 标题</title>
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
$oDocumentController = &getController('document');
|
$oDocumentController = &getController('document');
|
||||||
|
|
||||||
// 해당글의 댓글 수를 업데이트
|
// 해당글의 댓글 수를 업데이트
|
||||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count);
|
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, true);
|
||||||
|
|
||||||
// 댓글의 권한을 부여
|
// 댓글의 권한을 부여
|
||||||
$this->addGrant($obj->comment_srl);
|
$this->addGrant($obj->comment_srl);
|
||||||
|
|
|
||||||
|
|
@ -378,10 +378,12 @@
|
||||||
/**
|
/**
|
||||||
* @brief 해당 document의 댓글 수 증가
|
* @brief 해당 document의 댓글 수 증가
|
||||||
**/
|
**/
|
||||||
function updateCommentCount($document_srl, $comment_count) {
|
function updateCommentCount($document_srl, $comment_count, $comment_inserted = false) {
|
||||||
$args->document_srl = $document_srl;
|
$args->document_srl = $document_srl;
|
||||||
$args->comment_count = $comment_count;
|
$args->comment_count = $comment_count;
|
||||||
|
|
||||||
|
if($comment_inserted) $args->update_order = -1*getNextSequence();
|
||||||
|
|
||||||
return executeQuery('document.updateCommentCount', $args);
|
return executeQuery('document.updateCommentCount', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
</tables>
|
</tables>
|
||||||
<columns>
|
<columns>
|
||||||
<column name="comment_count" var="comment_count" notnull="notnull" />
|
<column name="comment_count" var="comment_count" notnull="notnull" />
|
||||||
|
<column name="update_order" var="update_order" />
|
||||||
</columns>
|
</columns>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue