오래된 게시물에 댓글이 달린 경우 확인하기가 어려워 다음처럼 만들어 씁니다
최신 댓글 표시는 등록일 다음날 자정까지 표시하도록 하였습니다
list.php 윗부분 적당한 곳에 삽입
------------------------------------------------
$cur_day1=date("Y-m-d");
$cur_day=date("Y-m-d H:i:s", strtotime("-1 day",strtotime($cur_day1) ) );
$result_comment = sql_query(" select wr_parent from $g4[board_new_table] where bo_table ='$bo_table' and wr_id<>wr_parent and bn_datetime >= '$cur_day' ");
$new_comment=array();
while( $tmp = sql_fetch_array($result_comment) ){
array_push($new_comment, $tmp[wr_parent]);
}
//////////////////////////////////////////////////////////////////////////////////////////
get_list부분을 찾아서 마지막 인수부분을 아래와 같이 수정(두 군데..)
get_list($row, $board, $board_skin_path, $board[bo_subject_len],$new_comment);
common.lib.php 263행(?) 수정
----------------------------------------------
function get_list($write_row, $board, $skin_path, $subject_len=40, $new_comm=array())
======================================
$list[comment_cnt] = "";
if ($list[wr_comment])
$list[comment_cnt] = "($list[wr_comment])"; 부분 다음과 같이 수정(get_list함수 내의...)
======================================
$list[comment_cnt] = "";
$list[icon_comment] = "";
if ($list[wr_comment]) {
if(in_array($list[wr_id], $new_comm) ) $list[icon_comment]="<img src='$g4[path]/images/icon_comment.gif' align='absmiddle'>";
$list[comment_cnt] = "($list[wr_comment])";
}
------------------------------------------------------------------------
list.skin.php 53행(?) 수정
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) {
//뉴코멘트 가 있으면 표시 ##############################
if($list[$i][icon_comment]) $list[$i][icon_new]=$list[$i][icon_comment];
?>
최신글에 댓글이 달리면 최신글 표시 대신 새로운 댓글 아이콘으로 표시되게 함
=========================================
위에서 images/icon_comment.gif 로 설정했으므로 images 폴더에 새로운 댓글 아이콘을
제작하여 업로드 합니다(화일명 icon_comment.gif)
너무 복잡한가요?
전 필요해서 하는 수 없이....
최신글에도 latest.lib.php 와 latest.skin.php를 위와 같은 방법으로 수정하면
새로운 댓글에 NEW 아이콘을 달 수 있지만 별로 유용한 것 같지는 않더군요
최신 댓글 표시는 등록일 다음날 자정까지 표시하도록 하였습니다
list.php 윗부분 적당한 곳에 삽입
------------------------------------------------
$cur_day1=date("Y-m-d");
$cur_day=date("Y-m-d H:i:s", strtotime("-1 day",strtotime($cur_day1) ) );
$result_comment = sql_query(" select wr_parent from $g4[board_new_table] where bo_table ='$bo_table' and wr_id<>wr_parent and bn_datetime >= '$cur_day' ");
$new_comment=array();
while( $tmp = sql_fetch_array($result_comment) ){
array_push($new_comment, $tmp[wr_parent]);
}
//////////////////////////////////////////////////////////////////////////////////////////
get_list부분을 찾아서 마지막 인수부분을 아래와 같이 수정(두 군데..)
get_list($row, $board, $board_skin_path, $board[bo_subject_len],$new_comment);
common.lib.php 263행(?) 수정
----------------------------------------------
function get_list($write_row, $board, $skin_path, $subject_len=40, $new_comm=array())
======================================
$list[comment_cnt] = "";
if ($list[wr_comment])
$list[comment_cnt] = "($list[wr_comment])"; 부분 다음과 같이 수정(get_list함수 내의...)
======================================
$list[comment_cnt] = "";
$list[icon_comment] = "";
if ($list[wr_comment]) {
if(in_array($list[wr_id], $new_comm) ) $list[icon_comment]="<img src='$g4[path]/images/icon_comment.gif' align='absmiddle'>";
$list[comment_cnt] = "($list[wr_comment])";
}
------------------------------------------------------------------------
list.skin.php 53행(?) 수정
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) {
//뉴코멘트 가 있으면 표시 ##############################
if($list[$i][icon_comment]) $list[$i][icon_new]=$list[$i][icon_comment];
?>
최신글에 댓글이 달리면 최신글 표시 대신 새로운 댓글 아이콘으로 표시되게 함
=========================================
위에서 images/icon_comment.gif 로 설정했으므로 images 폴더에 새로운 댓글 아이콘을
제작하여 업로드 합니다(화일명 icon_comment.gif)
너무 복잡한가요?
전 필요해서 하는 수 없이....
최신글에도 latest.lib.php 와 latest.skin.php를 위와 같은 방법으로 수정하면
새로운 댓글에 NEW 아이콘을 달 수 있지만 별로 유용한 것 같지는 않더군요
댓글 3개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1989 | |
| 1986 | |
| 1980 | |
| 1969 | |
| 1966 | |
| 1957 | |
| 1943 | |
| 1937 | |
| 1930 | |
| 1907 | |
| 1906 | |
| 1889 | |
| 1887 | |
| 1886 | |
| 1881 | |
| 1856 | |
| 1843 | |
| 1839 | |
| 1809 | |
| 1800 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기