git-svn-id: http://xe-core.googlecode.com/svn/trunk@1375 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-05-09 04:55:44 +00:00
parent e2b8651986
commit 99b2ff6f62
4 changed files with 36 additions and 5 deletions

View file

@ -127,7 +127,13 @@
**/
function zdate($str, $format = "Y-m-d H:i:s") {
if(!$str) return;
return date($format, mktime(substr($str,8,2), substr($str,10,2), substr($str,12,2), substr($str,4,2), substr($str,6,2), substr($str,0,4)));
$hour = (int)substr($str,8,2);
$min = (int)substr($str,10,2);
$sec = (int)substr($str,12,2);
$year = (int)substr($str,0,4);
$month = (int)substr($str,4,2);
$day = (int)substr($str,6,2);
return date($format, mktime($hour, $min, $sec, $month?$month:1, $day?$day:1, $year));
}
/**

View file

@ -165,7 +165,14 @@
// 검색 옵션
$args->search_target = trim(Context::get('search_target')); ///< 검색대상
$args->search_keyword = trim(Context::get('search_keyword')); ///< 검색어
if($args->search_keyword && !$args->search_target) $args->search_target = "title_content"; ///< 검색 고정
// 키워드 검색이 아닌 검색일 경우 목록의 수를 40개로 고정
if($args->search_target && $args->search_keyword) $args->list_count = 40;
// 키워드 검색의 경우 제목,내용으로 검색 대상 고정
if($args->search_keyword && !$args->search_target) $args->search_target = "title_content";
// 블로그 카테고리
$args->category_srl = $this->category_srl;
$args->sort_index = 'list_order'; ///< 소팅 값

View file

@ -2,11 +2,29 @@
<!-- 목록 -->
<div style="margin-bottom:20px;">
<!--@if($document_list)-->
<!-- 검색된 글 목록이 있고 권한이 있을 경우 출력 -->
<!--@if($document_list && $grant->list)-->
<!--@foreach($document_list as $no => $document)-->
<!--@if($document && $grant->list)-->
<!-- 검색어가 사용되었을 경우 목록형태로 출력 -->
<!--@if($search_target && $search_keyword)-->
<div>
<!-- 일자, 제목 출력-->
[{zdate($document->regdate, "Y-m-d")}] <a href="#" onclick="winopen('./?document_srl={$document->document_srl}');return false;">{$document->title}</a>
<!-- 댓글이 있으면 댓글의 수 출력 -->
<!--@if($document->comment_count)-->({number_format($document->comment_count)})<!--@end-->
<!-- 엮인글이 있으면 엮인글의 수 출력 -->
<!--@if($document->trackback_count)-->({number_format($document->trackback_count)})<!--@end-->
</div>
<!-- 검색어가 없다면 내용을 바로 출력 -->
<!--@else-->
<!--#include("./view_document.html")-->
<!--@end-->
<!--@end-->
<!--@else-->
{$lang->no_documents}

View file

@ -32,7 +32,7 @@
</div>
<!--@end-->
<div style="margin:10px 0px 10px 0px;padding:5px 0px 5px 0px;height:200px;border-top:1px solid #EEEEEE;border-bottom:1px solid #EEEEEE;" class="content">{$document->content}</div>
<div style="margin:10px 0px 10px 0px;padding:5px 0px 5px 0px;border-top:1px solid #EEEEEE;border-bottom:1px solid #EEEEEE;" class="content">{$document->content}</div>
<div style="clear:both;height:20px;margin:0px 0px 10px 0px">
<!--@if($document->tag_list)-->