최근글에 공지사항을 제외시키고자할 경우

by 갈매빛 / 崠駐 posted Apr 01, 2010
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
저의 경우 제로보드4에서 이전한 게시글과 새로 작성된 게시글들이 한 게시판에 있을경우

날짜가 뒤섞여버려 최근글 출력이 이상하게 되는 현상이있었습니다.

이 팁은 혹시나 저와 같은 최근글 뒤섞임현상을 피해 전과같은 형태로 출력되기를 원하시는분

혹은 최근글목록에 공지글을 제외시키고자하시는분들을 위한 팁입니다.


수정할 파일은 두개, 각각 한줄씩 코드를 삽입하면 됩니다.

/widgets/newest_document/queries/getNewestDocuments.xml
/widgets/newest_document/newest_document.class.php 

1.  getNewestDocuments.xml  
 
        <condition operation="in" column="module_srl" var="module_srl" filter="number" />
        <condition operation="equal" column="category_srl" var="category_srl" pipe="and" />
        <condition operation="excess" column="list_order" var="avoid_notice" pipe="and" />  //삽입된 코드


2. newest_document.class.php  43째줄 바로아래

 $obj->sort_index = $order_target;
            $obj->order_type = $order_type=="desc"?"asc":"desc";
            $obj->list_count = $list_count;
            if($obj->sort_index == 'list_order') $obj->avoid_notice = -2100000000;  // 삽입된 코드