게시글 댓글 중복 막기

게시글 댓글 중복 막기

QA

게시글 댓글 중복 막기

본문

그누보드 게시글 내에 같은사람이 한계정으로 1댓글만 달수 있고

그 이상은 댓글을 쓰는걸 막고싶은데 방법 공유 해주실 분 계신가요?

이 질문에 댓글 쓰기 :

답변 1

view_comment.php 파일 수정해보세요

 


$is_comment_write = false;
if ($member['mb_level'] >= $board['bo_comment_level'])
    $is_comment_write = true;
// 코멘트 작성 여부 확인
$sql = " select count(*) from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 and mb_id = '".$member['mb_id']."'";
$row = sql_fetch($sql);
$write_cnt = $row['cnt'];
if($write_cnt)    // 코멘트를 작성 하였다면 댓글 쓰기 차단
    $is_comment_write = false;


$is_comment_write = false;
if ($member['mb_level'] >= $board['bo_comment_level'])
    $is_comment_write = true;

// 상단은 이미 소스가 작성되어 있을 겁니다.
// 하단에 넣어주시면 됩니다.

// 코멘트 작성 여부 확인
$sql = " select count(*) from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 and mb_id = '".$member['mb_id']."'";
$row = sql_fetch($sql);
$write_cnt = $row['cnt'];
if($write_cnt)    // 코멘트를 작성 하였다면 댓글 쓰기 차단
    $is_comment_write = false;

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

회원로그인

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