채택완료

댓글 제목을 지정한 값으로 처리할 수 있을지?

2019-06-25 (화) 15:53:56 2,584

댓글의 내용을 입력하는 칸을 없애도 상관없습니다. 

내용을 "참여합니다." 이런식으로 댓글로만 넣도록 하려합니다. 

|

답변 1개

채택된 답변
+20 포인트

view._comment.skin.php에서

아래 내용 찾아서 제거 

Copy
<span class="sound_only">내용</span>

<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>

<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="내용" placeholder="댓글내용을 입력해주세요"

<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>

<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>

<script>

$(document).on("keyup change", "textarea#wr_content[maxlength]", function() {

var str = $(this).val()

var mx = parseInt($(this).attr("maxlength"))

if (str.length > mx) {

$(this).val(str.substr(0, mx));

return false;

}

});

</script>
Copy
<input type="hidden" name="is_good" value="">

부분 찾아서 해당 라인 밑에

Copy
<input type="hidden" name="wr_content" value="참여합니다.">

답변을 작성하려면 로그인이 필요합니다.