목록에 여러개의 코멘트쓰기창을 넣었을때 자동등록방지를 사용하거나 없애는 법
관련링크
본문
너무 길어져서 질문글을 나눠서 올리게되었습니다.
목록에 코멘트 쓰는 창이 여러개 존재합니다.
로그인 사용은 문제가 없는듯 한데, 비로그인상태로 글작성이 불가능합니다.
제일 위의 코멘트 쓰기에만 자동등록방지 이미지가 뜹니다.
이미지가 뜨긴하지만 작성을 시도하면 '자동등록방지 입력 글자가 틀렸거나 입력 횟수가 넘었습니다. 새로고침을 클릭하여 다시 입력해 주십시오.' 라고 뜹니다. 새로고침을 누르고 시도하여도 마찬가지입니다.
기왕이면 자동등록방지를 사용하고싶으나 올라온 게시물 전부에 자동등록방지 이미지가 생성되면 로딩이 좀 걸리는 것 같았습니다.(고치던 중간에 뭔가 잘못되었는데 각코멘트당 자동등록방지 이미지가 불러와지고 비로그인 글작성이 가능했던때가 있었습니다. 게시판 접속시 로딩이 엄청 길었습니다.ㅠㅠ;)
로딩이 그리 길지않다면 자동등록방지를 사용하고 싶습니다.
목록에 뜨는 게시글에 맞춰 자동등록방지가 뜨게하는게 불가능하거나 그렇게했을때 매우 느려진다면 목록에서 사용하는 코멘트 쓰기창에는 자동등록방지를 사용하지 않고싶습니다.
팝업코멘트나 글쓰기에는 자동등록방지를 사용하면서 목록의 코멘트 쓰기창에는 자동등록방지를 사용하지 않을 수 있을까요?
view_comment.skin
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?><a id="com_view"></a>
<script language="JavaScript">
// 글자수 제한
var char_min = parseInt(<?php echo $comment_min?>); // 최소
var char_max = parseInt(<?php echo $comment_max?>); // 최대
</script>
<!-- 코멘트 리스트 -->
<?
if(in_array($wr_id,$write_is_notice)&&!$is_admin&&$notice_per)$wnc=false; else $wnc=true;
if((($com_btn=='2')||(($com_btn=='1')&&$com_open_close))&&$is_comment_write&&$wnc)$cwform=true; else $cwform=false;
$comment_cnt=$ajax_comment_cnt?$ajax_comment_cnt:($lists[$ii]['wr_comment']?$lists[$ii]['wr_comment']:$view['wr_comment']);
$cmt_amt = count($list);$d_o1_arr_[9]=$d_o1_arr_[9]?$d_o1_arr_[9]:'Dice2';
for ($i=0;$i<$cmt_amt;$i++) {
$c_id = $list[$i]['wr_id'];
$comwwr4=explode('|',$list[$i]['wr_4']);
$comclose=$comwwr4[0];
$dice=explode(',',$comwwr4[1]);
$gi_v=guild_return($comwwr4[2],$list[$i]['wr_name'],$list[$i]['mb_id']);
$gi_f=(($go_arr[1]&&$gi_v[0])?$gi_v[0]:'').(($go_arr[3]&&$gi_v[1])?$gi_v[1]:'').(($go_arr[6]&&$gi_v[2])?$gi_v[2]:'');
$gi_r=((!$go_arr[1]&&$gi_v[0])?$gi_v[0]:'').((!$go_arr[3]&&$gi_v[1])?$gi_v[1]:'').((!$go_arr[6]&&$gi_v[2])?$gi_v[2]:'');
unset($d_v);
$d_v=dice_return($comwwr4[1]);
if($d_v[1]||$d_v[3])$d_v[1]=($d_v[1]?'<div class="dice_content">'.$d_v[1].'</div>':'').($d_v[3]?'<div class="dice_content2" style="margin-top:'.(($d_v[1]&&$d_v[3])?$d_o3_arr_[6]:'').'px;">'.$d_v[3].'</div>':'');
else {
$is_dice_view_content='';$d_v[1]='';
}
if($d_v[0]||$d_v[2])$d_v[0]=($d_v[0]?'<span class="dice_name">'.$d_v[0].'</span>':'').(($d_v[0]&&$d_v[2])?$d_o3_arr_[5]:'').($d_v[2]?'<span class="dice_name2">'.$d_v[2].'</span>':'').$is_dice_view_content;
else $d_v[0]=''.$is_dice_view_content;
?><a id="view<?php echo $c_id?>"></a>
<div align="left">
<table cellpadding="0" cellspacing="0" border="0" class="com_total_class" style="width:100%;">
<tr><?
$comtsize=$table_r_size;
$com_re=$comtsize;
for (
$k=0;
$k<strlen($list[$i]['wr_comment_reply']);
$k++
) {
$com_plus=20*($k+1);
$com_re=$comtsize-20-(20*$k);
} ?><td style="width:<?php echo $com_plus?>px;"><div style="width:<?php echo ($com_plus?$com_plus:'0')?>px;"></div></td>
<td style="width:<?php echo $table_percent?'100%':$com_re.'px';?>;" align="left" class="content_comment_box">
<?
unset($com_plus);
$list[$i]['content'] = nl2br(url_auto_link(stripslashes($list[$i]['content'])));
if ($list[$i]['wr_homepage']&&($list[$i]['wr_homepage']!='http://')) $space2 = ' ';
$s_content1=$list[$i]['content'];
$s_content2=$list[$i]['content'];
$ip_date='';
if (strstr($list[$i]['wr_option'], "secret")&&!$ms_list_view2&&!get_session('sc_view_'.$bo_table.'_'.$list[$i]['wr_id'])) {
$s_content1='<span class="secret_text1">'.$secret_text.'</span>';
if(!$is_member||($is_member&&$board['bo_6_subj'])) {
$s_content1='
<div id="pnlDisplay'.$list[$i]['wr_id'].'">
<form name="sc_view_form_'.$list[$i]['wr_id'].'" method="post" action="'.($com_secret_ajax?$board_skin_path.'/a_sc_view.php':'').'">
<input type="hidden" name="bo_table" value="'.$bo_table.'">
<input type="hidden" name="wr_id" id="wr_id" value="'.$list[$i]['wr_id'].'">
<input type="hidden" name="page" value="'.$page.'">
<input type="hidden" name="view" value="'.$view['wr_id'].'">
<div class="div_toggle" id="sc_view1'.$list[$i]['wr_id'].'" style="display:block;margin-bottom:3px;">
<a href="#" onclick="layer_toggle(document.getElementById(\'sc_view1'.$list[$i]['wr_id'].'\')); layer_toggle(document.getElementById(\'sc_view2'.$list[$i]['wr_id'].'\')); return false;">'.$s_content1.'</a>
</div>
<div class="div_toggle" id="sc_view2'.$list[$i]['wr_id'].'" style="display:none;margin-bottom:3px;">
<div class="sc_view_box">
<div class="sc_view_box_close">
<span id="sc_view_loading'.$list[$i]['wr_id'].'">
<img src="'.$board_skin_url.'/img/87.gif" style="width:0px;height:0px;">
</span>
<a href="#" onclick="layer_toggle(document.getElementById(\'sc_view1'.$list[$i]['wr_id'].'\')); layer_toggle(document.getElementById(\'sc_view2'.$list[$i]['wr_id'].'\')); return false;" class="small_link">
<img src="'.$board_skin_url.'/img/sc_view_box_close.gif">
</a>
</div>
<div>
<input type="password" name="sc_view_code" value="" class="write_input2">
</div>
<div>
<input type="'.($com_secret_ajax?'submit':'button').'" name="sc_view_ok" value="확인" class="default_button" '.($com_secret_ajax?'':'onclick="sc_view_update(\''.$list[$i]['wr_id'].'\',\''.$board['bo_table'].'\');"').'>
</div>
</div>
</div>
</form>
</div>
';
}
$s_content2='';
$ip_date=true;
}
$space='';
if ($is_member) {
$com_re_ur='/skin/board/'.$board['bo_skin'];
$com_re_file='view_comment.skin.pop.php';
$com_edit_e='cu';
} else {
$com_re_ur='/bbs';
$com_re_file='password.php';
$com_edit_e='u';
}
if ((($member['mb_id'] == $list[$i]['mb_id']) && ($is_member && $list[$i]['mb_id'])) || $is_admin) {
$space=' ';
if (!$list[$i]['is_del']) $space2 = '';
$ip_date='';
$s_content1=$list[$i]['content'];
$s_content2=$list[$i]['content'];
if ($is_comment_write)$list[$i]['is_edit']=true;
} else if ($member['mb_id'] == $list[$i]['mb_id']) {
$space=' ';
if (!$list[$i]['is_del']) $space2 = '';
if ($is_comment_write)$list[$i]['is_edit']=true;
} else {
if($list[$i]['wr_homepage'])$space='';
}
$home = str_replace('http://','',$list[$i]['wr_homepage']);
$home_link = '<a href="http://'.$home.'" onclick="window.open(this.href, \'target\', \'\'); return false;" title="홈페이지" class="com_small_link"><img src="'.$board_skin_url.'/img/co_btn_hompage.gif"'.$guild_absmiddle_tag.' /></a>' ;
if (($list[$i]['wr_homepage'] == 'http://') || ($list[$i]['wr_homepage'] == '')) {
$home_url = '';
} else {
$home_url = $space.$home_link;
}
$member_icon=G5_DATA_URL.'/member/'.substr($list[$i]['mb_id'],0,2).'/'.$list[$i]['mb_id'].'.gif';
$cname=(strstr($list[$i]['wr_option'], 'secret')&&!$com_secret_name&&!get_session('sc_view_'.$bo_table.'_'.$list[$i]['wr_id']))?'?':strip_tags($list[$i]['name']);
$list[$i]['wr_1']=explode('|',$list[$i]['wr_1']);
if($list[$i]['wr_1'][0]) {
$comclose_title_1=$list[$i]['wr_1'][0];
$comclose_title_2=$list[$i]['wr_1'][0];
} else {
$comclose_title_1=$comclose_title1;
$comclose_title_2=$comclose_title2;
}
if($list[$i]['wr_1'][1]){$list[$i]['wr_1'][1]='<div><span class="memo_style">'.$memo_option_ex[2].'</span><span class="memo_style_title">'.$list[$i]['wr_1'][1].'</span><span class="memo_style">'.$memo_option_ex[3].'</span></div>';}
switch($date_option) {
case'';
case'0';
$datetime=date('Y.m.d H:i:s', strtotime($list[$i]['wr_datetime']));
break;
case'1';
$datetime=date('Y.m.d', strtotime($list[$i]['wr_datetime']));
break;
case'2';
$datetime='';
break;
}
if($date_position) {
$datetime_p_b=' ';
$datetime_p_t=$datetime;
} else {
$datetime_p_b=$datetime;
$datetime_p_t='';
$ipspace=' | ';
}
if($writer_view&&($list[$i]['wr_ip']==$writer_ip))$writer_ip2=' <span class="content_date2">[그린이]</span>';
else$writer_ip2='';
?><div class="com_style_div"><table cellpadding="0" cellspacing="0" border="0" class="com_style_table"><tr><td>
<span class="content_name">
<? if (!$ip_date||$com_secret_name) {
if (!$board['bo_use_sideview']||!$list[$i]['mb_id']||!is_file($member_icon)) {
if (is_file($member_icon)) { ?><img src="<?php echo $member_icon ?>"<?php echo $guild_absmiddle_tag ?>/>
<? } else if($noicon_view) { ?><img src="<?php echo $board_skin_url ?>/img/re_noicon.gif"<?php echo $guild_absmiddle_tag?>class="re_noicon">
<? }
} echo ($noicon_view?' ':'').($gi_f?$gi_f.' ':'').(
$nametagf?namatag_view(
$list[$i]['mb_id'],
$list[$i]['wr_name'],
$list[$i]['wr_email'],
$list[$i]['wr_homepage']
):$list[$i]['name']).($gi_r?' '.$gi_r:'');
} echo $writer_ip2;echo$d_v[0];
if(!$ip_date||$com_secret_date) echo ($datetime_p_t?' <span class="content_date2">'.$datetime_p_t.'</span>':'');
if (strstr($list[$i]['wr_option'], "secret")) { ?>
<img src="<?php echo $board_skin_url ?>/img/lock.gif"<?php echo $guild_absmiddle_tag ?>>
<?}?></span>
<span class="content_button">
<? if ($list[$i]['is_edit']) { ?><a href="#" onClick="opennewsletter_('','<?php echo $sfl?>','<?php echo $stx?>','<?php echo $spt?>','<?php echo $cwin?>','<?php echo $cname?>','댓글을 수정합니다','<?php echo $c_id?>','<?php echo $com_re_ur?>','<?php echo $com_re_file?>','<?php echo $com_edit_e?>'); return false" title="수정" class="com_small_link">
<img src="<?php echo $board_skin_url ?>/img/co_btn_modify.gif"<?php echo $guild_absmiddle_tag?>/>
</a>
<? } ?><? if ($list[$i]['is_del']) { ?>
<a href="javascript:<?php echo $is_member?'if (confirm(\'삭제하시겠습니까?\'))':''; ?>{location='<?php echo $list[$i]['del_link']?>';}" title="삭제" class="com_small_link">
<img src="<?php echo $board_skin_url ?>/img/co_btn_delete.gif"<?php echo $guild_absmiddle_tag?>/>
</a>
<? } ?><?php echo $home_url?></span>
<!-- 코멘트 출력 -->
<div class="clear_both"></div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#fff"></td>
<td bgcolor="#fff">
<div class="wr_content">
<? if($comclose) {
echo $list[$i]['wr_1'][1];
$comdiv='</div>';
echo div_toggle(
'comclose1',
'comclose2',
$list[$i]['wr_id'],
'<span class="link_box2">',
'',
($ct_t1?$ct_arr[0][0]:'').$comclose_title_1.($ct_t1?$ct_arr[0][2]:' +'),
($ct_t2?$ct_arr[1][0]:'').$comclose_title_2.($ct_t2?$ct_arr[1][2]:' -'),
'</span>');
}
echo $d_v[1].(!$comclose?$list[$i]['wr_1'][1]:'').$s_content1; echo $comdiv; unset($comdiv,$d_v);?></div>
</td>
<td bgcolor="#fff"></td>
</tr>
</table>
</td></tr></table></div>
<? if(($comment_cnt!=($i+1))||$is_ip_view||(!$date_position&&!$ip_date||($com_secret_date&&$datetime_p_b!=' '))) { ?><div class="content_date"><? if (!$ip_date||$com_secret_date) {
echo $datetime_p_b;
if($is_ip_view)echo'<span class="ip_style">'.$ipspace.$list[$i]['ip'].'</span>';
} else echo' ';?></div>
<? } ?><? if($cwform) { ?><div class="clear_both"></div>
<div id="rr<?php echo $list[$i]['wr_id']?>" class="rr" style="display:none;"></div>
<? } ?></td></tr>
</table>
</div>
<? unset($comclose_title_1,$comclose_title_2);
} ?><a id="cview<?php echo $wr_id?>"></a>
<?
if($is_ip_view||$is_comment_write&&$com_btn&&(($com_btn&&$date_position)||$date_option!=2))echo'<br />';
echo'<div class="com_byn_width" id="cwfdid'.$wr_id.'">';
if(($com_btn=='1')&&$wnc)echo view_reply($cwa?$wr_id:(($lists[$ii]['wr_id']?$lists[$ii]['wr_id']:$view['wr_id'])),($lists[$ii]['wr_name']?$lists[$ii]['wr_name']:$view['wr_name']));
if($cwform) { ?>
<!-- 코멘트쓰기 start -->
<div id="rrfi<?php echo $wr_id?>">
<div id="rrf<?php echo $wr_id?>">
<form id="ir1<?php echo $wr_id?>" name="fviewcomment<?php echo $wr_id?>" class="ftest" method="post" action="<?php echo G5_BBS_URL ?>/write_comment_update.php" onsubmit="return fviewcomment_submit(this,'<?php echo $wr_id?>');" autocomplete="off">
<div style="width:10px;height:10px;position:absolute;top:-300px;left:-300px;z-index:1">
\<input type="submit" value="" style="width:0px;height:0px;border: #dcdcdc 0px solid;">
</div>
<div id="cwfb<?php echo $wr_id?>" class="com_write_form_bottom" style="<? if(($com_btn=='1')&&$com_open_close)echo 'padding-top:12px;';?>width:<?php echo ($cwf_bottom?$cwf_bottom.'px;':'width:100%;');?><?php echo ((($com_btn=='1')&&$com_open_close)?'display:none;':'');?>">
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
<input type="hidden" name="w" id="w" value="c">
<input type="hidden" name="bo_table" value="<?php echo $bo_table?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id?>">
<input type="hidden" name="comment_id" id="comment_id" value="">
<input type="hidden" name="bf" value="1">
<input type="hidden" name="page" value="<?php echo $page?>">
<? if($is_guest) { ?>
<div class="guest_form">
<table cellspacing="0" cellpadding="0" border="0" class="com_write_table">
<tbody>
<tr>
<td id="td1" class="name">이름<input type="text" maxLength="100" name="wr_name" itemname="이름" value="<?=$_POST['cwa']?$wr_name:get_cookie('webgcooa')?>" required class="write_input1">
</td>
<td id="td2" class="pass">비번<input type="password" maxLength="20" name="wr_password" id="wr_password" itemname="패스워드" value="<?=$_POST['cwa']?$wr_password2:get_cookie('webgcoob')?>" required class="write_input1">
</td>
<td id="td2" class="home">홈<input type="text" maxLength="200" name="wr_homepage" itemname="홈페이지" value="<?=$_POST['cwa']?$wr_homepage:get_cookie('webgcooc')?>" class="write_input1">
</td>
</tr>
</tbody>
</table>
</div>
<? } ?><span id="tt<?php echo $wr_id?>"></span>
<span id="ck">
<? if($board['bo_use_secret']==1) { ?><span class="ck_secret">
<input type="checkbox" id="wr_secret<?php echo $wr_id?>" name="wr_secret" value="secret"<?php echo ($write['wr_option']=='secret')?'checked':'';?>class="checkbox_style" title="비밀">
<label for="wr_secret<?php echo $wr_id?>" title="비밀">S</label>
<? if($board['bo_6_subj']&&($board['bo_6_subj']!=2)) { ?><span class="div_toggle<?php echo $wr_id?>" id="sc_view1<?php echo $wr_id?>" >
<a href="#" onclick="layer_toggle(document.getElementById('sc_view1<?php echo $wr_id?>')); layer_toggle(document.getElementById('sc_view2<?php echo $wr_id?>')); return false;">▼</a>
</span>
<? } echo'</span>';
} if($is_guest&&!$w_o_arr[4]) { ?><span class="ck_cookie_save">
<input type="checkbox" id="<?php echo $cookie_id?><?php echo $wr_id?>" name="<?php echo $cookie_id?>" value="1" class="checkbox_style" title="<?php echo $cookie_title?>">
<label for="<?php echo $cookie_id?><?php echo $wr_id?>" title="<?php echo $cookie_title?>"><?php echo $cookie_text?></label>
</span>
<span class="ck_pass_save">
<input type="checkbox" id="<?php echo $cookie_id2?><?php echo $wr_id?>" name="<?php echo $cookie_id2?>" value="1" class="checkbox_style" title="<?php echo $cookie_title2?>">
<label for="<?php echo $cookie_id2?><?php echo $wr_id?>" title="<?php echo $cookie_title2?>"><?php echo $cookie_text2?></label>
</span>
<? } ?><span class="ck_comclose">
<input type="checkbox" id="comclose<?php echo $wr_id?>" name="comclose" value="1" <? if($w=='cu')echo$wwr4[0]?'checked':'';?>class="checkbox_style" title="코멘트 접기">
<label for="comclose<?php echo $wr_id?>" title="코멘트 접기">Close</label>
<input type="text" name="wr_1" value="" class="write_input2" title="코멘트 접기"></span>
<? if($is_html) {?><span class="ck_icon">
<a href="#" onClick="NewWindow('<?php echo $board_skin_url ?>/a_icon_auto.php?bo_table=<?php echo $bo_table?>&wr_id=<?php echo $wr_id?>&icon_pop=1','icon',470,250,'yes','center'); return false;" class="default_link" title="아이콘">Ico</a>
</span>
<? } ?><? if($d_o1_arr_[1]||$d_o2_arr_[1]) { ?><span class="ck_dice">
<input type="checkbox" id="dice<?php echo $wr_id?>" name="dice" value="1" class="checkbox_style" title="<?php echo ($d_o1_arr_[0]?$d_o1_arr_[0]:'주사위');?>">
<label for="dice<?php echo $wr_id?>" title="<?php echo ($d_o1_arr_[0]?$d_o1_arr_[0]:'주사위');?>"><?php echo ($d_o1_arr_[4]?$d_o1_arr_[4]:'Dice');?></label>
</span>
<? } ?><? if($d_o3_arr_[1]||$d_o4_arr_[1]) { ?><span class="ck_dice2">
<input type="checkbox" id="dice_b<?php echo $wr_id?>" name="dice_b" value="1" title="<?php echo ($d_o3_arr_[0]?$d_o3_arr_[0]:'주사위2');?>">
<label for="dice_b<?php echo $wr_id?>" title="<?php echo ($d_o3_arr_[0]?$d_o3_arr_[0]:'주사위2');?>"><?php echo ($d_o3_arr_[4]?$d_o3_arr_[4]:'Dice2');?></label>
</span>
<? } ?></span>
<div class="div_toggle<?php echo $wr_id?>" id="sc_view2<?php echo $wr_id?>" style="<?php echo (get_cookie('sc_view_code')&&$board['bo_6_subj']&&($board['bo_6_subj']!=2))?'display:block;':'display:none;';?>margin-bottom:3px;">비밀글 보기 비번
<input type="password" name="sc_view_code" value="<?php echo get_cookie('sc_view_code')?get_cookie('sc_view_code'):'';?>" class="write_input2">
<img src="<?php echo $board_skin_url ?>/img/config_h.gif" class="cursor_pointer" onclick="NewWindow('<?php echo $board_skin_url ?>/a_icon_auto.php?bo_table=<?php echo $bo_table?>&wr_id=<?php echo $wr_id?>&icon_pop=1&scvh=1','icon',400,150,'no','center'); return false;" align="absmiddle">
</div>
<div class="guild"><?php echo $guild_input_view;?></div>
<? if($memo_option_ex[0]) { ?><table cellspacing="0" cellpadding="0" border="0" class="memo">
<tr><td class="memo1">memo</td>
<td class="memo2"><? if($browser_check=='MSIE') { ?> <? } ?><input name="wr_memo" id="wr_memo" itemname="메모" value="" class="write_input1" style="width:100%;">
</td></tr>
</table>
<? } ?>
<div class="textarea"><textarea name="wr_content" id="wr_content" class="write_textarea" rows="3" itemname="내용" required <? if($min_max) { ?>onkeyup="check_str(this,'min_max',<?php echo $wr_id ?>);"
onmousemove="check_str(this,'min_max',<?php echo $wr_id ?>);"
onfocus="check_str(this,'min_max',<?php echo $wr_id ?>);"
<? } ?>></textarea>
</div>
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;padding:0;margin:0;">
<tbody>
<?php if ($is_guest) { ?><tr><td><?php echo $captcha_html; ?></td></tr><?php } ?>
<tr>
<? if($is_guest&&($w_o_arr[4]==1)) {?><td style="width:167px;padding:0;margin:0;">
<input type="checkbox" id="<?php echo $cookie_id?><?php echo $wr_id?>" name="<?php echo $cookie_id?>" value="1" title="<?php echo $cookie_title?>">
<label for="<?php echo $cookie_id?><?php echo $wr_id?>" title="<?php echo $cookie_title?>"><?php echo $cookie_text_?></label>
<input type="checkbox" id="<?php echo $cookie_id2?><?php echo $wr_id?>" name="<?php echo $cookie_id2?>" value="1" title="<?php echo $cookie_title2?>">
<label for="<?php echo $cookie_id2?><?php echo $wr_id?>" title="<?php echo $cookie_title2?>"><?php echo $cookie_text2_?></label>
</td>
<? } ?>
<td id="rrb<?php echo $wr_id?>" style="padding:0;margin:0;">
<input type="submit" name="pushbutton" id="ok<?php echo $wr_id?>" value="write" border="0" accesskey="s" onclick="c_k();" class="default_button">
</td>
<? if($is_guest&&($w_o_arr[4]==2)) { ?><td style="width:164px;padding:0;margin:0;text-align:right;">
<input type="checkbox" id="<?php echo $cookie_id?><?php echo $wr_id?>" name="<?php echo $cookie_id?>" value="1" title="<?php echo $cookie_title?>">
<label for="<?php echo $cookie_id?><?php echo $wr_id?>" title="<?php echo $cookie_title?>"><?php echo $cookie_text_?></label>
<input type="checkbox" id="<?php echo $cookie_id2?><?php echo $wr_id?>" name="<?php echo $cookie_id2?>" value="1" title="<?php echo $cookie_title2?>">
<label for="<?php echo $cookie_id2?><?php echo $wr_id?>" title="<?php echo $cookie_title2?>"><?php echo $cookie_text2_?></label>
</td>
<? } ?></tr>
</tbody>
</table>
<? if($min_max) { ?><div class="min_max_style" style="text-align:right;">
<span id="min_max<?php echo $wr_id?>">0</span>/<?php echo ($comment_min?'Min:'.$comment_min:'').($comment_min&&$comment_max?'~':'').($comment_max?'Max:'.$comment_max:'');?></div>
<? } ?></div>
</form>
</div>
</div>
<? } ?>
</div>
<? unset($c_id,$wnc); ?>
</div>
<script>
function fviewcomment_submit(f)
{
var content = '';
var error1='';
var error2='';
var error3='';
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if(pop2&&is_dhtml_editor) {
if(typeof(ed_wr_content)!='undefined')ed_wr_content.returnFalse();
} else {
f.wr_content.focus();
}
return false;
}
if (error1) {
alert('스팸글로 의심되어 차단되었습니다');
f.wr_content.focus(); return false;
}
if (error2) {
alert(error2);
f.wr_content.focus();
return false;
}
if (error3) {
alert(error3);
f.wr_content.focus();
return false;
}
<?php if($is_guest) echo chk_captcha_js(); ?>
set_comment_token(f);
document.getElementById("ok<?php echo $wr_id?>").disabled = "disabled";
return true;
}
</script>
답변 2
캡챠 기능을 빼시려면
소스에서
<?php if ($is_guest) { ?><tr><td><?php echo $captcha_html; ?></td></tr><?php } ?>
이부분 지워주시고
스크립트 부분에서
<?php if($is_guest) echo chk_captcha_js(); ?> 부분 지워주세요
그리고
댓글 등록 페이지 에서
if(!chk_captcha())
alert('자동등록방지 숫자가 틀렸습니다.');
이부분 삭제해주시면
캡챠없이 등록 가능 합니다
아.. 너무 복잡하게 만드셨는데.. 만든 개발자가 아닌이상.. 해석하기 힘듭니다..
무슨 의도로 만들었는지도 모르겠어요..