기본 게시판 스킨 비밀글 답글의 열람 권한에 원댓글 작성자를 추가
3개
비밀 댓글 작성 시, 해당 댓글에 답변을 비밀글로 작성하면 비밀 댓글 작성자는 답변을 읽을 수 없던 부분을 수정
+ 비회원 비밀댓글 작성 시 본인 글의 댓글내용 확인 눌러 비번 입력하면 본인 댓글에 달린 비밀 대댓글 내용 볼 수 있음
view.comment.skin.php 에서 해당 부분을 찾아서
<?php
$cmt_amt = count($list);
for ($i=0; $i<$cmt_amt; $i++) {
$comment_id = $list[$i]['wr_id'];
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 50;
$comment = $list[$i]['content'];비밀글 답글의 열람 권한에 원댓글 작성자를 추가할 수 있도록 아래 코드로 변경한다
<?php
$cmt_amt = count($list);
$comment_owner_by_thread = array();
for ($i=0; $i<$cmt_amt; $i++) {
$comment_id = $list[$i]['wr_id'];
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 50;
$comment = $list[$i]['content'];
if (empty($list[$i]['wr_comment_reply'])) {
$comment_owner_by_thread[$list[$i]['wr_comment']] = array(
'wr_id' => $comment_id,
'mb_id' => $list[$i]['mb_id']
);
} elseif (
strpos($list[$i]['wr_option'], 'secret') !== false &&
isset($comment_owner_by_thread[$list[$i]['wr_comment']]) &&
(
(!empty($member['mb_id']) && $member['mb_id'] === $comment_owner_by_thread[$list[$i]['wr_comment']]['mb_id']) ||
get_session('ss_secret_comment_'.$bo_table.'_'.$comment_owner_by_thread[$list[$i]['wr_comment']]['wr_id'])
)
) {
$comment = conv_content($list[$i]['wr_content'], 0, 'wr_content');
$comment = search_font($stx, $comment);
}- 이전글기본 게시판 스킨 수정: 관련글 목차 표시 + 좋아요 시스템 이식 26.08.23
- 다음글타임라인 스킨 글 작성 시 댓글접기 디폴트로 하기 26.06.03
댓글목록
댓글
니루 @tabom0w0