| [ 댓글작성 후 본문 열람하기 ] |
basic pc 스킨 기준입니다. basic 모바일에서는 #blindComment 의 css 만 모바일에 맞춰 고쳐주세요. view.skin.php 에서 적당 부분에 아래의 코드를 첨가합니다.
|
<?php $comment_member = sql_fetch(" select count(*) as cnt from {$write_table} where mb_id = '{$member['mb_id']}' and wr_parent = '{$view['wr_id']}' and wr_is_comment = 1 "); $yes_comment_member = ($is_admin || $write['mb_id'] == $member['mb_id'] || $comment_member['cnt']); if (!$yes_comment_member) { ?> <style> #blindComment { font-weight:bold; color:#c00000; text-align:center; background-color:#f7d7e4; border:1px solid #cccccc; box-sizing:border-box; margin-top:20px; padding:150px 0px 150px 0px; } </style> <script> document.addEventListener("DOMContentLoaded", function() { bo_v_atc.insertAdjacentHTML("beforebegin", "<div id='blindComment'>댓글작성 후 열람가능</div>"); bo_v_atc.innerHTML = ""; bo_v_atc.style.display = "none"; if (typeof bo_v_file == "object") bo_v_file.innerHTML = ""; if (typeof bo_v_link == "object") bo_v_link.innerHTML = ""; } ); </script> <?php } ?>
|
댓글을 달지 않은 회원은 첨부파일과 첨부이미지 및 첨부링크까지 보이지 않고 본문이 아래처럼 보입니다. 물론 관리자와 글쓴이는 제외됩니다.
|
댓글의 글자수는 게시판 설정에서 정할 수 있습니다.
|