테스트 사이트 - 개발 중인 베타 버전입니다

댓글에 스마트에디터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); ?>

 

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

 

 

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 12개

@나무사랑 감사합니다...
평안한 저녁시간 되세요...^ㅡ^~
너무 잘되네요.. 대박ㅠㅠ 감사합니당
@LucyJ
감사합니다. 편안한 시간 되세요~~~!!!
필요한 정보였어요 감사합니다!!
@백백망
네...감사합니다...^ㅡ^~
저는 에디터는 나오는데 글을 쓰면 올바른 방법으로 이용해 주세요 라는 에러메세지가 나오네요 어디가 잘못되었을까요.?
'올바른 방법으로 이용해 주세요'로 검색창에 검색을 한번해보세요...
내용이 많아서 어느 부분일지...
@모아비즈 '올바른 방법으로 이용해 주세요'로 검색해서 다 찾아보았지만 이상있는데는 없습니다

기존 스킨에는 댓글이 잘 써지는데 알려주신 댓글에 에디터를 달아서 하면 '올바른 방법으로 이용해 주세요' 가 나오네요
수정해야하는 파일명이 뭔가요?^^;;
댓글 수정을 누르면 수정이 되질 않는데 무슨 코드를 추가하면 될까요?

게시판 목록

그누보드5 팁자료실

글쓰기