코멘트순서가 뒤로밀려서 맨처음으로나오게하고싶습니다.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

코멘트순서가 뒤로밀려서 맨처음으로나오게하고싶습니다.. 정보

코멘트순서가 뒤로밀려서 맨처음으로나오게하고싶습니다..

첨부파일

view_comment.skin.php (21.8K) 0회 다운로드 2013-01-05 00:15:04

본문

코멘트 맨위로 오게 질문답변을 다뒤져봤는데요.. 아래처럼 답변이 나오는데.,...
----------------------------------------------------------------------------------------------
헐랭이 2012.01.11 12:15:55 211.♡.227.73
작성자에 의해 채택됐습니다.
bbs/view_comment.php 에 보시면 아래처럼 나오는 부분이 있습니다.
위에 있는 주석친걸 풀어주고 아래껄 주석처리하시면 됩니다.

// 코멘트 출력
//$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment desc, wr_comment_reply ";
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";



/bbs/view_comment.php 에서

// 코멘트 출력
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";

이부분이 있습니다.  order by 가 정렬을 해주는 것이지요

 order by wr_datetime asc 나 desc 로 바꿔주시면 됩니다. asc 오름차순  desc는 내림차순.

--------------------------------------------------------------------------------------------


코멘트 순서를 처음답글이 맨위로 올라오고 싶은데... 맨뒤로가네요..
질문답변란에 찾아봐도.. 위내용을 찾았는데... 코드에.. 위사항이 없어요..
배추빌더용이라서 그런가요?
view_comment.skin.php에 봐도

 <!-- 코멘트 출력 -->
                <div id=view_<?=$list[$i][wr_id]?>>
                <?
                $str = $list[$i][content];
                if (strstr($list[$i][wr_option], "secret")) {
                    $str = "<span class='mw_basic_comment_secret'>* $str</span>";
                }
                $str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
                $str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
                $str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
                echo $str;
                ?>
                </div>
                <? if ($list[$i][trackback]) { echo "<p>".$list[$i][trackback]."</p>"; } ?>
                <? if ($mw_basic[cf_source_copy]) { // 출처 자동 복사 ?>
                <? $copy_url = set_http("{$g4[url]}/{$g4[bbs]}/board.php?bo_table={$bo_table}&wr_id={$wr_id}#c_{$list[$i][wr_id]}"); ?>
                <script type="text/javascript">
                AutoSourcing.setString(<?=$list[$i][wr_id]?> ,"<?=$config[cf_title]?>", "<?=$list[$i][wr_name]?>", "<?=$copy_url?>");
                </script>
                <? } ?>
  • 복사

댓글 전체

수정해야 하는 파일은 skin 파일이 아닌
/bbs/view_comment.php  <== 이파일 입니다.
지금 수정하고 계신 파일은 skin 파일입니다.따라서 파일을 위에껄로 다시 열어보세요

여기 보시면

$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";

이런식의 쿼리문이 있을텐데 여기서 정렬을 바꿔주시면 됩니다.
아.. 답변 너무감사드립니다..해결되었습니다... 스킨파일이 아니라 그누보드 bbs파일이었군요 덕분에... 소중한 답한마디 감사드립니다 좋은주말되세요^^
© SIRSOFT
현재 페이지 제일 처음으로