댓글의 댓글을 비밀글로 달때 원댓글쓴이에게도 보이기
현재 그누보드의 댓글 방식이 댓글의 댓글을 비밀글로 달 경우 원글쓴이와 관리자에게만 보이고 원댓글쓴이에게는 보이지 않게 되어있는 것 같더군요.
이것 때문에 사용자들이 조금 헷갈려 하시기에 답댓글폼에서는 비밀글 체크를 못하게 할까도 생각했는데 그냥 원댓글쓴이에게도 보이게 하는 걸로 기능을 좀 손봤습니다.
원본을 어쩔 수 없이 수정해야 합니다.
bbs/view_comment.php 의 아래 구문을 (g5-5.0b07버전을 기준으로 44~52행)
$list[$i]['content'] = $list[$i]['content1']= '비밀글 입니다.';
if (!strstr($row['wr_option'], 'secret') ||
$is_admin ||
($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
($row['mb_id']==$member['mb_id'] && $member['mb_id'])) {
$list[$i]['content1'] = $row['wr_content'];
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
}
이렇게 고칩니다.
///답댓글의 비밀글을 원댓글쓴이에게 보이기. 추가 ★★★★★★
$pre_comment_info = substr($row['wr_comment_reply'],0,-1);
$pre_comment = sql_fetch(" select mb_id from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 and wr_comment = '{$row['wr_comment']}' and wr_comment_reply = '{$pre_comment_info}' ");
$list[$i]['content'] = $list[$i]['content1']= '비밀글 입니다.';
if (!strstr($row['wr_option'], 'secret') ||
$is_admin ||
($pre_comment['mb_id']==$member['mb_id'] && $member['mb_id']) || ///답댓글의 비밀글을 원댓글쓴이에게 보이기. 추가 ★★★★★★
($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
($row['mb_id']==$member['mb_id'] && $member['mb_id'])) {
$list[$i]['content1'] = $row['wr_content'];
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
}
이것 때문에 사용자들이 조금 헷갈려 하시기에 답댓글폼에서는 비밀글 체크를 못하게 할까도 생각했는데 그냥 원댓글쓴이에게도 보이게 하는 걸로 기능을 좀 손봤습니다.
원본을 어쩔 수 없이 수정해야 합니다.
bbs/view_comment.php 의 아래 구문을 (g5-5.0b07버전을 기준으로 44~52행)
$list[$i]['content'] = $list[$i]['content1']= '비밀글 입니다.';
if (!strstr($row['wr_option'], 'secret') ||
$is_admin ||
($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
($row['mb_id']==$member['mb_id'] && $member['mb_id'])) {
$list[$i]['content1'] = $row['wr_content'];
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
}
이렇게 고칩니다.
///답댓글의 비밀글을 원댓글쓴이에게 보이기. 추가 ★★★★★★
$pre_comment_info = substr($row['wr_comment_reply'],0,-1);
$pre_comment = sql_fetch(" select mb_id from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 and wr_comment = '{$row['wr_comment']}' and wr_comment_reply = '{$pre_comment_info}' ");
$list[$i]['content'] = $list[$i]['content1']= '비밀글 입니다.';
if (!strstr($row['wr_option'], 'secret') ||
$is_admin ||
($pre_comment['mb_id']==$member['mb_id'] && $member['mb_id']) || ///답댓글의 비밀글을 원댓글쓴이에게 보이기. 추가 ★★★★★★
($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
($row['mb_id']==$member['mb_id'] && $member['mb_id'])) {
$list[$i]['content1'] = $row['wr_content'];
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
}
댓글 12개
12년 전
고맙습니다~~
12년 전
완전 감사합니다 ^^
11년 전
저도 완전 감사합니다. 복 많으실 거예요^^
10년 전
고맙습니다~^^
10년 전
비회원일땐 어떻게 적용해야 할까요?
9년 전
비회원일경우는 비밀번호로 확인하여 열람되도록 하여야 합니다.
9년 전
현제의 그누버전에서는 오류가 있습니다 ㅠㅠ
댓글의 댓글에 관리자의 비밀댓글도 같은적용으로 가능한지요..
질문글을 올렸더니..
의뢰하라는 글만 올라오네요 ㅠㅠ
댓글의 댓글에 관리자의 비밀댓글도 같은적용으로 가능한지요..
질문글을 올렸더니..
의뢰하라는 글만 올라오네요 ㅠㅠ
9년 전
죄송합니다.. 글을 자세히 안읽어서 그렇네요..해결되었습니다 ^^
초보제작자
8년 전
도움 받고 갑니다 ^^
5년 전
좋은 팁 감사합니다.
소소한여자
5년 전
좋은 팁 감사합니다
3년 전
감사합니다.
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4402 | ||
| 2634 | 6개월 전 | 609 | ||
| 2633 | 6개월 전 | 598 | ||
| 2632 |
|
6개월 전 | 508 | |
| 2631 | 6개월 전 | 569 | ||
| 2630 |
세르반데스
|
6개월 전 | 538 | |
| 2629 | 6개월 전 | 727 | ||
| 2628 | 6개월 전 | 412 | ||
| 2627 | 6개월 전 | 417 | ||
| 2626 |
이슈DEV
|
7개월 전 | 636 | |
| 2625 |
welcome
|
7개월 전 | 645 | |
| 2624 |
이슈DEV
|
7개월 전 | 449 | |
| 2623 | 7개월 전 | 407 | ||
| 2622 | 7개월 전 | 496 | ||
| 2621 | 7개월 전 | 350 | ||
| 2620 |
|
7개월 전 | 370 | |
| 2619 | 7개월 전 | 479 | ||
| 2618 | 7개월 전 | 465 | ||
| 2617 | 7개월 전 | 555 | ||
| 2616 | 7개월 전 | 678 | ||
| 2615 | 7개월 전 | 582 | ||
| 2614 | 7개월 전 | 410 | ||
| 2613 |
바닐라코드
|
8개월 전 | 730 | |
| 2612 | 8개월 전 | 594 | ||
| 2611 | 8개월 전 | 731 | ||
| 2610 | 8개월 전 | 967 | ||
| 2609 | 8개월 전 | 508 | ||
| 2608 | 8개월 전 | 653 | ||
| 2607 | 8개월 전 | 631 | ||
| 2606 | 8개월 전 | 576 | ||
| 2605 | 8개월 전 | 602 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기