코멘트/댓글 작성 "올바른 방법으로..." 오류

코멘트/댓글 작성 "올바른 방법으로..." 오류

QA

코멘트/댓글 작성 "올바른 방법으로..." 오류

본문

해결 방법 : 

 

에러가 발생하는 게시판 스킨 view_comment.skin.php 파일 수정.

하단 스크립트에서 아래 내용을 찾은 후 바로 아래에 빨간색 코드를 추가

 

<?php if($is_guest) echo chk_captcha_js(); ?>

set_comment_token(f);

 

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ검색하고 이걸 제일 많이 봤는데요

 

문제가 된 스킨 파일에는
<?php if($is_guest) echo chk_captcha_js(); ?>
이 문구가 아예 존재하지 않습니다...ㅜㅠ

 

아래는 view_comment.skin.php 전문입니다

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<?php
$cmt_amt = count($c_list);
for ($c_i=0; $c_i<$cmt_amt; $c_i++) {
    $comment_id = $c_list[$c_i]['wr_id'];
    $cmt_depth = ""; // 댓글단계
    $cmt_depth = strlen($c_list[$c_i]['wr_comment_reply']) * 20;
    $comment = $c_list[$c_i]['content'];
    $comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
    $cmt_sv = $cmt_amt - $c_i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
    
    if($c_list[$c_i]['is_reply'] || $c_list[$c_i]['is_edit'] || $c_list[$c_i]['is_del']) {
        $query_string = clean_query_string($_SERVER['QUERY_STRING']);
        if($w == 'cu') {
            $sql = " select wr_id, wr_content from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
            $cmt = sql_fetch($sql);
            $c_wr_content = $cmt['wr_content'];
        }
        $c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w_'.$list[$i][wr_id];
        $c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w_'.$list[$i][wr_id];
    }
?>

<div class="item-comment" id="c_<?php echo $comment_id ?>">
    <div class="co-header">
        <p><?=$c_list[$c_i]['name']?></p>
    </div>
    <div class="co-content">
        <div class="original_comment_area">
            <?
                $c_list[$c_i]['wr_content'] = htmlspecialchars($c_list[$c_i]['wr_content']);
                $c_list[$c_i]['content'] = autolink($c_list[$c_i]['wr_content'], $bo_table);
                $c_list[$c_i]['content'] = conv_content($c_list[$c_i]['content'], 2);
                echo $c_list[$c_i]['content'];
            ?>
        </div>
        <? if($member[mb_id] == $c_list[$c_i][mb_id] || $is_admin) { ?>
        <div class="modify_area" id="save_comment_<?php echo $comment_id ?>">
            <textarea id="save_co_comment_<?php echo $comment_id ?>"><?php echo get_text($c_list[$c_i]['content1'], 0) ?></textarea>
            <button type="button" class="ui-style-btn mod_comment" onclick="modify_commnet('<?php echo $comment_id ?>'); return false;">MODIFY</button>
        </div>
        <? } ?>
    </div>
    <div class="co-footer">
        <? if($c_list[$c_i]['wr_1']) { 
            $dice = explode("||", $c_list[$c_i]['wr_1']);
        ?>
        <span class="dice">
            <img src="<?=$board_skin_url?>/img/d<?=$dice[0]?>.png" />
            <img src="<?=$board_skin_url?>/img/d<?=$dice[1]?>.png" />
        </span>
        <? } ?>
        <span class="date">
            <?=date('Y-m-d H:i:s', strtotime($c_list[$c_i]['wr_datetime']))?>
        </span>
        <?php if ($c_list[$c_i]['is_del'])  { ?><a href="<?php echo $c_list[$c_i]['del_link'];  ?>" onclick="return comment_delete();" class="del">삭제</a><?php } ?>
        <?php if ($c_list[$c_i]['is_edit']) { ?><a href="<?php echo $c_edit_href;  ?>" onclick="comment_box('<?php echo $comment_id ?>', '<?=$list[$i][wr_id]?>'); return false;" class="mod">수정</a><?php } ?>
    </div>
</div>
<? } ?>
<?php if ($c_is_comment_write) {
    if($w == '')
        $w = 'c';
?>
<? if($is_member) { ?>
<!-- 댓글 쓰기 시작 { -->
<aside class="bo_vc_w" id="bo_vc_w_<?=$list[$i][wr_id]?>">
    <form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
    <input type="hidden" name="w" value="<?php echo $w ?>" id="w">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
    <input type="hidden" name="wr_id" value="<?php echo $list[$i][wr_id] ?>">
    <input type="hidden" name="sca" value="<?php echo $sca ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
    <input type="hidden" name="stx" value="<?php echo $stx ?>">
    <input type="hidden" name="spt" value="<?php echo $spt ?>">
    <input type="hidden" name="page" value="<?php echo $page ?>">
    <input type="hidden" name="log" value="<?php echo $_GET['log']?>">
    <input type="hidden" name="wr_subject" value="덧글" />
    <div class="input-comment">
        <textarea name="wr_content" required class="required" title="내용"></textarea>
        <p>
            <input type="checkbox" name="game" id="game_<?=$list[$i][wr_id]?>" value="dice" />
            <label for="game_<?=$list[$i][wr_id]?>">DICE</label>
<?    if((date('Y-m-d') >= '2016-06-10' && date('Y-m-d') <= '2016-06-12') && $character[ch_2] > 0) { ?>
              
            <input type="checkbox" name="event" id="event_<?=$list[$i][wr_id]?>" value="drink" />
            <label for="event_<?=$list[$i][wr_id]?>">Betting</label>
<? } ?>
        </p>
    </div>
    <div class="btn_confirm">
        <button type="submit" class="ui-style-btn ui-comment-submit">코멘트입력</button>
    </div>
    </form>
</aside>
<? } ?>
<? include_once($board_skin_path."/view_comment.script.skin.php"); ?>
<?php } ?>
<!-- } 댓글 쓰기 끝 -->

이 질문에 댓글 쓰기 :

답변 2

스크립트스킨도 확인해보셨나요?

현재 스킨단에 캡챠가없는데 글쓰기할때 검사를해서 오류가 날수도있어요

해당 코드를 스킨단에서 추가를 시켜보세요

답변을 작성하시기 전에 로그인 해주세요.
전체 61
QA 내용 검색

회원로그인

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