코멘트수 관련된 이 부분 작동합니까? 정보
코멘트수 관련된 이 부분 작동합니까?본문
common.lib.php의 267째줄부터 다음과 같은 부분이 있습니다.
///////////////////
$list[comment_cnt] = "";
if ($list[wr_comment])
{
$list[comment_cnt] = "($list[wr_comment])";
if ($list[wr_last_comment] >= date("Y-m-d H:i:s", $g4[server_time] - ($board[bo_new] * 3600)))
$list[comment_cnt] = '<b>' . $list[comment_cnt] . '</b>';
}
//////////////////////
짐작컨데 이건 제가 이곳에서 두차례나 질문해 가며 찾고 있는 새코멘트등록시 코멘트수 특별강조표기와 관련된 거 아닌가요? 근데 저는 한번도 이게 작동하는걸 본 적이 없습니다. 이게 작동하도록 하려면 어디를 고쳐야 하나요?
늘 감사합니다.
///////////////////
$list[comment_cnt] = "";
if ($list[wr_comment])
{
$list[comment_cnt] = "($list[wr_comment])";
if ($list[wr_last_comment] >= date("Y-m-d H:i:s", $g4[server_time] - ($board[bo_new] * 3600)))
$list[comment_cnt] = '<b>' . $list[comment_cnt] . '</b>';
}
//////////////////////
짐작컨데 이건 제가 이곳에서 두차례나 질문해 가며 찾고 있는 새코멘트등록시 코멘트수 특별강조표기와 관련된 거 아닌가요? 근데 저는 한번도 이게 작동하는걸 본 적이 없습니다. 이게 작동하도록 하려면 어디를 고쳐야 하나요?
늘 감사합니다.
댓글 전체
일단 게시판 테이블에 wr_last_comment라는 colum을 추가합니다. (datetime이죠)
<?php
include_once('./_common.php');
$sql = "select bo_table from {$g4['board_table']}";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
sql_query("ALTER TABLE `{$g4['write_prefix']}{$row['bo_table']}` ADD `wr_last_comment` DATETIME NOT NULL", FALSE);
}
?>
그리고 bb/write_comment_update.php에서 153번 라인에 보면
// 원글에 코멘트수 증가
sql_query(" update $write_table set wr_comment = wr_comment + 1 where wr_id = '$wr_id' ");
이런게 있습니다.
// 원글에 코멘트수 증가
sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last_comment = '$g4[time_ymdhis]' where wr_id = '$wr_id' ");
이렇게 수정하면 될 겁니다.
<?php
include_once('./_common.php');
$sql = "select bo_table from {$g4['board_table']}";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
sql_query("ALTER TABLE `{$g4['write_prefix']}{$row['bo_table']}` ADD `wr_last_comment` DATETIME NOT NULL", FALSE);
}
?>
그리고 bb/write_comment_update.php에서 153번 라인에 보면
// 원글에 코멘트수 증가
sql_query(" update $write_table set wr_comment = wr_comment + 1 where wr_id = '$wr_id' ");
이런게 있습니다.
// 원글에 코멘트수 증가
sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last_comment = '$g4[time_ymdhis]' where wr_id = '$wr_id' ");
이렇게 수정하면 될 겁니다.