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

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

Winter0 5년 전 조회 2,322

해결 방법 : 

 

에러가 발생하는 게시판 스킨 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 전문입니다

 

</strong></p>

<p><?php

if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

?></p>

<p><?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']);</p>

<p>        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'];

        }</p>

<p>        $c_reply_href = './board.php?'.$query_string.'&amp;c_id='.$comment_id.'&amp;w=c#bo_vc_w_'.$list[$i][wr_id];

        $c_edit_href = './board.php?'.$query_string.'&amp;c_id='.$comment_id.'&amp;w=cu#bo_vc_w_'.$list[$i][wr_id];

    }

?></p>

<p>

<div class="item-comment" id="c_<?php echo $comment_id ?>">

    <div class="co-header">

        <p><?=$c_list[$c_i]['name']?></p>

    </div></p>

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

        <? } ?></p>

<p>        <span class="date">

            <?=date('Y-m-d H:i:s', strtotime($c_list[$c_i]['wr_datetime']))?>

        </span></p>

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

<? } ?></p>

<p><?php if ($c_is_comment_write) {

    if($w == '')

        $w = 'c';

?></p>

<p><? 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 ?>"></p>

<p>    <input type="hidden" name="log" value="<?php echo $_GET['log']?>"></p>

<p>    <input type="hidden" name="wr_subject" value="덧글" /></p>

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

<p><?    if((date('Y-m-d') >= '2016-06-10' && date('Y-m-d') <= '2016-06-12') && $character[ch_2] > 0) { ?>

              </p>

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

<p>    </form>

</aside>

<? } ?>

<? include_once($board_skin_path."/view_comment.script.skin.php"); ?></p>

<p><?php } ?>

<!-- } 댓글 쓰기 끝 -->

<strong>

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

답변 2개

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

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

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

W
Winter0
5년 전
원래 없었던지라 어느 부분에 추가해야 할지 모르겠네요ㅠㅠ; 이리저리 넣어봤는데 오류가 뜹니다...특정 스킨만 검사 안 하게 하는 방법은 없는 건가요?

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

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

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

W
Winter0
5년 전
확인했습니다. view_comment.script.skin.php 파일에도 <?php if($is_guest) echo chk_captcha_js(); ?> 문구가 없습니다

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

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

로그인