댓글에 스마트에디터2 적용하기... > 그누보드5 팁자료실

그누보드5 팁자료실

댓글에 스마트에디터2 적용하기... 정보

댓글에 스마트에디터2 적용하기...

본문

댓글에 스마트에디터2 적용하기...

 

1) 상단에...

 

<?

$commnet_editor = true;
$is_dhtml_editor = true;
if($commnet_editor)
include_once(G5_EDITOR_LIB);
$editor_html = editor_html('wr_content', $content, $is_dhtml_editor);

?>

를 넣으세요...

 

2) $comment = $list[$i]['content']; 다음줄에...

 

아래의 코드를 추가하세요...
$comment = nl2br(stripslashes($list[$i]['wr_content'])); //댓글 태그적용

 

3) 

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

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

    <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>

 

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

<script> 사이에 위의 코드로 교체하세요...

 

4. function fviewcomment_submit(f) { 밑에 아래의 코드를 추가하세요.
    
    <?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
    <?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>

 

- 감사합니다. (모아비즈) -

 

 

추천
8

댓글 12개

저는 에디터는 나오는데 글을 쓰면 올바른 방법으로 이용해 주세요 라는 에러메세지가 나오네요 어디가 잘못되었을까요.?
'올바른 방법으로 이용해 주세요'로 검색해서 다 찾아보았지만 이상있는데는 없습니다

기존 스킨에는 댓글이 잘 써지는데 알려주신 댓글에 에디터를 달아서 하면 '올바른 방법으로 이용해 주세요' 가 나오네요
전체 2,427 |RSS
그누보드5 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT