4.03.00으로 업데이트 하면서 코멘트 정렬순서 사수하기 ^^
업데이트 전이라면
upgrade.php의 34번 라인 즉
sql_query(" UPDATE `{$g4[write_prefix]}{$row[bo_table]}` set wr_is_comment = 1 where wr_comment < 0 ", FALSE); 을
sql_query(" UPDATE `{$g4[write_prefix]}{$row[bo_table]}` set wr_is_comment = 1 and wr_comment = abs(wr_comment) where wr_comment < 0 ", FALSE);
로 바꾸고 실행합니다.
이미 업데이트 했다면
<?php
$g4_path = '..';
include_once("{$g4_path}/common.php");
$sql = " select bo_table from {$g4['board_table']}";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
// 별로 좋은 결과는 안나오는 듯
//sql_query(" UPDATE {$g4['write_prefix']}{$row['bo_table']} SET wr_comment = wr_comment + 1 WHERE wr_is_comment = 1 AND wr_comment > 0 ");
sql_query(" UPDATE {$g4['write_prefix']}{$row['bo_table']} SET wr_comment = ABS(wr_comment) WHERE wr_is_comment = 1 ");
}
?>
단 이미 새로 코멘트가 달렸다면 대략 난감.. OTL
upgrade.php의 34번 라인 즉
sql_query(" UPDATE `{$g4[write_prefix]}{$row[bo_table]}` set wr_is_comment = 1 where wr_comment < 0 ", FALSE); 을
sql_query(" UPDATE `{$g4[write_prefix]}{$row[bo_table]}` set wr_is_comment = 1 and wr_comment = abs(wr_comment) where wr_comment < 0 ", FALSE);
로 바꾸고 실행합니다.
이미 업데이트 했다면
<?php
$g4_path = '..';
include_once("{$g4_path}/common.php");
$sql = " select bo_table from {$g4['board_table']}";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
// 별로 좋은 결과는 안나오는 듯
//sql_query(" UPDATE {$g4['write_prefix']}{$row['bo_table']} SET wr_comment = wr_comment + 1 WHERE wr_is_comment = 1 AND wr_comment > 0 ");
sql_query(" UPDATE {$g4['write_prefix']}{$row['bo_table']} SET wr_comment = ABS(wr_comment) WHERE wr_is_comment = 1 ");
}
?>
단 이미 새로 코멘트가 달렸다면 대략 난감.. OTL
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기
댓글 3개
아따..리플 위치가 바뀌니 읽기가 오히려 더 불편하군요...
잘 사용하겠습니다..감사~
g4에서 고정적으로 사용하는 코멘트의 정렬순서 같은 것은 변경을 하지 않았으면 좋았을텐데,,, g3에서 g4로 넘어오면서 많이 혼란스러웠습니다.