댓글의 댓글을 비밀글로 달때 원댓글쓴이에게도 보이기
현재 그누보드의 댓글 방식이 댓글의 댓글을 비밀글로 달 경우 원글쓴이와 관리자에게만 보이고 원댓글쓴이에게는 보이지 않게 되어있는 것 같더군요.
이것 때문에 사용자들이 조금 헷갈려 하시기에 답댓글폼에서는 비밀글 체크를 못하게 할까도 생각했는데 그냥 원댓글쓴이에게도 보이게 하는 걸로 기능을 좀 손봤습니다.
원본을 어쩔 수 없이 수정해야 합니다.
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년 전 | 4417 | ||
| 114 |
JMoon
|
12년 전 | 19673 | |
| 113 | 12년 전 | 5304 | ||
| 112 | 12년 전 | 5004 | ||
| 111 |
사노라가노라
|
12년 전 | 5042 | |
| 110 | 12년 전 | 7024 | ||
| 109 | 12년 전 | 9725 | ||
| 108 | 12년 전 | 6201 | ||
| 107 | 12년 전 | 6863 | ||
| 106 | 12년 전 | 6231 | ||
| 105 | 12년 전 | 12542 | ||
| 104 | 12년 전 | 5763 | ||
| 103 | 12년 전 | 6239 | ||
| 102 | 12년 전 | 5616 | ||
| 101 | 12년 전 | 6768 | ||
| 100 | 12년 전 | 7174 | ||
| 99 | 12년 전 | 5282 | ||
| 98 | 12년 전 | 7094 | ||
| 97 |
kesan
|
12년 전 | 7242 | |
| 96 | 12년 전 | 7290 | ||
| 95 | 12년 전 | 8159 | ||
| 94 | 12년 전 | 5970 | ||
| 93 | 12년 전 | 5128 | ||
| 92 | 12년 전 | 5861 | ||
| 91 | 12년 전 | 6429 | ||
| 90 | 12년 전 | 5459 | ||
| 89 |
soul5932
|
12년 전 | 10959 | |
| 88 |
못말리는크리스
|
12년 전 | 8078 | |
| 87 | 12년 전 | 10207 | ||
| 86 | 12년 전 | 5577 | ||
| 85 |
사노라가노라
|
12년 전 | 11206 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기