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

코멘트 수정이 안됩니다.

· 13년 전 · 579
dokkabiteam_com_20111117_103644.jpg
회원제로 사이트를 운영하고 있습니다. 그중 특정 게시판은 비회원도 글을 쓸 수 있도록 했는데요.

비회원이 쓴 글에 회원과 운영자가 코멘트를 달았는데 둘 다 코멘트 수정이 안됩니다.
수정이 안되고 수정하려던 내용은 아래 새로운 코멘트로 달리네요;;; ㅠㅠ;;

회원용 게시판은 전부 정상적으로 작동이 되는데 비회원이 쓴 글에 대한 코멘트만 이렇게 됩니다.
게시판 설정도 1로 맞춰놨는데 왜 이러는지 모르겠어요;;

스킨은 그누보드 최신 베이직 스킨을 사용하고 있습니다.

----------그누보드 최신 베이직스킨 스크립트 부분입니다.-------------------

<script type="text/javascript" src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script type="text/javascript">
var save_before = '';
var save_html = document.getElementById('comment_write').innerHTML;

function good_and_write()
{
var f = document.fviewcomment;
if (fviewcomment_submit(f)) {
f.is_good.value = 1;
f.submit();
} else {
f.is_good.value = 0;
}
}

function fviewcomment_submit(f)
{
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자

f.is_good.value = 0;

/*
var s;
if (s = word_filter_check(document.getElementById('wr_content').value))
{
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
document.getElementById('wr_content').focus();
return false;
}
*/

var subject = "";
var content = "";
$.ajax({
url: "<?=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"subject": "",
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});

if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
f.wr_content.focus();
return false;
}

// 양쪽 공백 없애기
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
if (char_min > 0 || char_max > 0)
{
check_byte('wr_content', 'char_count');
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt)
{
alert("코멘트는 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
} else if (char_max > 0 && char_max < cnt)
{
alert("코멘트는 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
else if (!document.getElementById('wr_content').value)
{
alert("코멘트를 입력하여 주십시오.");
return false;
}

if (typeof(f.wr_name) != 'undefined')
{
f.wr_name.value = f.wr_name.value.replace(pattern, "");
if (f.wr_name.value == '')
{
alert('이름이 입력되지 않았습니다.');
f.wr_name.focus();
return false;
}
}

if (typeof(f.wr_password) != 'undefined')
{
f.wr_password.value = f.wr_password.value.replace(pattern, "");
if (f.wr_password.value == '')
{
alert('패스워드가 입력되지 않았습니다.');
f.wr_password.focus();
return false;
}
}

if (!check_kcaptcha(f.wr_key)) {
return false;
}

return true;
}

/*
jQuery.fn.extend({
kcaptcha_load: function() {
$.ajax({
type: 'POST',
url: g4_path+'/'+g4_bbs+'/kcaptcha_session.php',
cache: false,
async: false,
success: function(text) {
$('#kcaptcha_image')
.attr('src', g4_path+'/'+g4_bbs+'/kcaptcha_image.php?t=' + (new Date).getTime())
.css('cursor', '')
.attr('title', '');
md5_norobot_key = text;
}
});
}
});
*/

function comment_box(comment_id, work)
{
var el_id;
// 코멘트 아이디가 넘어오면 답변, 수정
if (comment_id)
{
if (work == 'c')
el_id = 'reply_' + comment_id;
else
el_id = 'edit_' + comment_id;
}
else
el_id = 'comment_write';

if (save_before != el_id)
{
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}

document.getElementById(el_id).style.display = '';
document.getElementById(el_id).innerHTML = save_html;
// 코멘트 수정
if (work == 'cu')
{
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
if (typeof char_count != 'undefined')
check_byte('wr_content', 'char_count');
if (document.getElementById('secret_comment_'+comment_id).value)
document.getElementById('wr_secret').checked = true;
else
document.getElementById('wr_secret').checked = false;
}

document.getElementById('comment_id').value = comment_id;
document.getElementById('w').value = work;

save_before = el_id;
}

if (typeof(wrestInitialized) != 'undefined')
wrestInitialized();

//jQuery(this).kcaptcha_load();
if (comment_id && work == 'c')
$.kcaptcha_run();
}

function comment_delete(url)
{
if (confirm("이 코멘트를 삭제하시겠습니까?")) location.href = url;
}

comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해서 추가 (root님)
</script>
<? } ?>

<? if($cwin==1) { ?></td><tr></table><p align=center><a href="javascript:window.close();"><img src="<?=$board_skin_path?>/img/btn_close.gif" border="0"></a><br><br><?}?>

---------------------------------------------------------------------------------

이 문제로 몇번씩 검색을 해봐도 도저히 해결이 안되서 고수님들께 도움 요청합니다..

댓글 작성

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

로그인하기

게시글 목록

번호 제목
284438
284437
284435
284430
284420
284417
284409
284401
284399
284397
284380
284378
284371
284370
284366
284364
284360
284357
284355
284354