코멘트 삭제하면...

코멘트 삭제하면...

QA

코멘트 삭제하면...

본문

삭제할 내용을 "삭제된 댓글입니다"
 
라고 업데이트를 하고싶은데
 
혹시 사용하시는 소스가 있으면 부탁드리겠습니다 ㅠㅠ

이 질문에 댓글 쓰기 :

답변 1

bbs/delete_comment.skin
 
// 코멘트 삭제
if (!delete_point($write[mb_id], $bo_table, $comment_id, '코멘트'))
    insert_point($write[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_parent]}-{$comment_id} 코멘트삭제");
// 코멘트 삭제
sql_query(" delete from $write_table where wr_id = '$comment_id' ");
// 코멘트가 삭제되므로 해당 게시물에 대한 최근 시간을 다시 얻는다.
$sql = " select max(wr_datetime) as wr_last from $write_table where wr_parent = '$write[wr_parent]' ";
$row = sql_fetch($sql);
                                     
// 원글의 코멘트 숫자를 감소
sql_query(" update $write_table set wr_comment = wr_comment - 1, wr_last = '$row[wr_last]' where wr_id = '$write[wr_parent]' ");
// 코멘트 숫자 감소
sql_query(" update $g4[board_table] set bo_count_comment = bo_count_comment - 1 where bo_table = '$bo_table' ");
// 새글 삭제
sql_query(" delete from $g4[board_new_table] where bo_table = '$bo_table' and wr_id = '$comment_id' ");
 
 
해당내용 다 주석처리......
 
$subtext="삭제된 댓글입니다.";
//새댓글
sql_query(" update $g4[board_table] set wr_subject = '$subtext', mb_id = '', wr_name = '' where wr_id = '$comment_id' ");
// 새글
sql_query(" update $g4[board_new_table] set wr_subject = '$subtext', mb_id = '', wr_name = '' where bo_table = '$bo_table' and wr_id = '$comment_id' ");

update g4_board set wr_subject = '삭제된 댓글입니다.', mb_id = '', wr_name = '' where wr_id = '168698'

1054 : Unknown column 'wr_id' in 'where clause'

error file : /bbs/delete_comment.php

이렇게 뜨네요 ㅠㅠ

죄송합니다 ;;;;;;

$subtext="삭제된 댓글입니다.";

//새댓글

sql_query(" update $write_table set wr_subject = '$subtext', mb_id = '', wr_name = '' where wr_id = '$comment_id' ");

// 새글
sql_query(" update $g4[board_new_table] set wr_subject = '$subtext', mb_id = '', wr_name = '' where bo_table = '$bo_table' and wr_id = '$comment_id' ");

이렇게 해보세요;;;;;;

새글은 걍 삭제로 하기로해서

댓글만 적용하려하는데

다시 기재해주신걸 적용하니...

내용은 유지되고 작성자 아이디 닉네임만 공백으로 업데이트 됩니다 ㅠㅠ

후 세세히 알려주셨는데...ㅠㅠ

맞습니다......글은 유지시키고 제목은 삭제되었습니다로 변경
글슨이의 아이디와 이름은 공백처리시키는 겁니다.....
이렇게 한뒤에 list.skin.php 에 <?=$list[$i][href]?>부분에

if ($list[$i][mb_id] == "" && $is_admin) {
echo $list[$i][href];
}

이렇게하면 관리자만 들어가게하면 됩니다.

$subtext="삭제된 댓글입니다.";

//새댓글

sql_query(" update $write_table set wr_content = '$subtext', mb_id = '', wr_name = '' where wr_id = '$comment_id' ");

// 새글
sql_query(" update $g4[board_new_table] set wr_content = '$subtext', wr_subject = '$subtext', mb_id = '', wr_name = '' where bo_table = '$bo_table' and wr_id = '$comment_id' ");

이렇게 해보세요;;;;;;

답변을 작성하시기 전에 로그인 해주세요.
전체 5,379 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT