원글 수정은..
<a href="./write.php?w=u&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>" class="write">+</a>
이 링크로 해결하고 있는데요
코멘트 수정은 도대체 어떻게 해야 할지 모르겠습니다...
스킨을 보니까 view_comment.skin.php에 다음과 같은 자바스크립트와 관련 부분이 있던데
막상 list.skin.php에서는 그걸 이용하는 것 같지도 않고...
코드를 복사하면 되나 싶었는데 list.skin.php에 붙여넣어도 안 되더라고요.
그리고 댓댓글을 달게 하려면 어떤 코드를 넣어야 하는지도 알고 싶습니다.
아시는 분 답변 부탁드립니다. 감사합니다.
<? if ($list[$i][is_reply]) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'c');\" style=\"font-size:10px;\">R</a> "; } ?>
<? if ($list[$i][is_edit]) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'cu');\" style=\"font-size:10px;\">M</a> "; } ?>
<? if ($list[$i][is_del]) { echo "<a href=\"javascript:comment_delete('{$list[$i][del_link]}');\" style=\"font-size:10px;\">D</a> "; } ?>
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();
if (comment_id && work == 'c')
$.kcaptcha_run();
}
function comment_delete(url)
{
if (confirm("Are you sure to delete the comment?")) location.href = url;
}
comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해서 추가 (root님)
<a href="./write.php?w=u&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>" class="write">+</a>
이 링크로 해결하고 있는데요
코멘트 수정은 도대체 어떻게 해야 할지 모르겠습니다...
스킨을 보니까 view_comment.skin.php에 다음과 같은 자바스크립트와 관련 부분이 있던데
막상 list.skin.php에서는 그걸 이용하는 것 같지도 않고...
코드를 복사하면 되나 싶었는데 list.skin.php에 붙여넣어도 안 되더라고요.
그리고 댓댓글을 달게 하려면 어떤 코드를 넣어야 하는지도 알고 싶습니다.
아시는 분 답변 부탁드립니다. 감사합니다.
<? if ($list[$i][is_reply]) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'c');\" style=\"font-size:10px;\">R</a> "; } ?>
<? if ($list[$i][is_edit]) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'cu');\" style=\"font-size:10px;\">M</a> "; } ?>
<? if ($list[$i][is_del]) { echo "<a href=\"javascript:comment_delete('{$list[$i][del_link]}');\" style=\"font-size:10px;\">D</a> "; } ?>
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();
if (comment_id && work == 'c')
$.kcaptcha_run();
}
function comment_delete(url)
{
if (confirm("Are you sure to delete the comment?")) location.href = url;
}
comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해서 추가 (root님)
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기