else if를 넣어야하는데 위치좀 가르쳐주세요 ㅠ 채택완료
코멘트 댓글 답변 취소하기를
https://sir.kr/bbs/profile.php?mb_id=tkskdl024" onclick="return false;" rel="nofollow" target="_blank" title="Policia 자기소개">Policia님꺼를 보고 해보려고 했는데요
내용은 =>
댓글에서 답변달기 버튼을 맨처음 1번 누르면 답변을 달수가 있고 //
다시 한번 누르면 답변달기가 취소되면서 원래 자리로 돌아간다고 합니다.
내용 : https://sir.kr/g5_tip/13322
view_comment.skin.php 에서 맨 아래줄쯤에 function comment_box 함수가 존재하는데
</p>
<p>if (save_before != el_id)
이런 if문이 있어요
https://sir.kr/bbs/profile.php?mb_id=tkskdl024" onclick="return false;" rel="nofollow" target="_blank" title="Policia 자기소개">Policia님의 말씀으론 이 아래
</p>
<p>else if(comment_id){
comment_box('', 'c');
}</p>
<p>
이것만 넣으면 끝이라고 하셨는데 // 전 안되더라구요 이걸 어디다가 넣는지도 잘 모르겠어요
초심자라 아에 코드들을 하나도 알지 못하겠어요
그래서 그냥 if (save_before != el_id) 밑에다가 에라이 하나 얻어걸리겠지 하고
else if(comment_id){ comment_box('', 'c'); }
를 복사해서 한줄 한줄 다 넣어보고 새로고침해서 해보고..그래도 저는 안되더라구요.
어디줄에다가 뭘 빼먹었나싶어서 다시 그럴듯한곳에 넣어보고 해봐도..숨은그림찾기 하는거 같습니다 ㅠ
혹시나 해서 https://sir.kr/bbs/profile.php?mb_id=tkskdl024" onclick="return false;" rel="nofollow" target="_blank" title="Policia 자기소개">Policia님 홈페이지를 가봤는데 잘 돌아가고 있어요
</p>
<p> if (save_before != el_id)
{
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}</p>
<p>
document.getElementById(el_id).style.display = '';
document.getElementById(el_id).innerHTML = save_html;</p>
<p> // 댓글 수정
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;</p>
<p>
}</p>
<p> document.getElementById('comment_id').value = comment_id;
document.getElementById('w').value = work;</p>
<p> // 페이지
if (comment_id) {
document.getElementById('comment_page').value = document.getElementById('comment_page_'+comment_id).value;
document.getElementById('comment_url').value = document.getElementById('comment_url_'+comment_id).value;
//별점
if(work == 'c') {
$("#bo_vc_star").hide();
} else {
if(document.getElementById('star_comment_'+comment_id).value > 0) {
document.getElementById('wr_star').value = document.getElementById('star_comment_'+comment_id).value;
$("#bo_vc_star").show();
} else {
$("#bo_vc_star").hide();
}
}
} else {
document.getElementById('comment_page').value = '';
document.getElementById('comment_url').value = './view_comment.page.php?bo_table=<?php echo $bo_table;?>&wr_id=<?php echo $wr_id;?>&crows=<?php echo $crows;?>';
//별점
document.getElementById('wr_star').value = 5;
$("#bo_vc_star").show();
}</p>
<p> if(save_before)
$("#captcha_reload").trigger("click");</p>
<p> save_before = el_id;
}
}</p>
<p> function comment_delete()
{
return confirm("이 댓글을 삭제하시겠습니까?");
}</p>
<p> comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)</p>
<p> <?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
// sns 등록
$(function() {
$("#bo_vc_send_sns").load(
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
function() {
save_html = document.getElementById('bo_vc_w').innerHTML;
}
);
});
<?php } ?>
</script>
<?php } ?>
<?php } else { ?></p>
<p>
위치좀 가르쳐주셨으면 감사하겠습니다 ㅠ.ㅠ
답변 2개
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
https://sir.kr/bbs/profile.php?mb_id=smmysong1" onclick="return false;" rel="nofollow" target="_blank" title="그누위즈 자기소개">그누위즈 님의 답변이 맞습니다.
</p>
<p> if (save_before != el_id)
{
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}</p>
<p> 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;</p>
<p> }
document.getElementById('comment_id').value = comment_id;
document.getElementById('w').value = work;
// 페이지
if (comment_id) {
document.getElementById('comment_page').value = document.getElementById('comment_page_'+comment_id).value;
document.getElementById('comment_url').value = document.getElementById('comment_url_'+comment_id).value;
//별점
if(work == 'c') {
$("#bo_vc_star").hide();
} else {
if(document.getElementById('star_comment_'+comment_id).value > 0) {
document.getElementById('wr_star').value = document.getElementById('star_comment_'+comment_id).value;
$("#bo_vc_star").show();
} else {
$("#bo_vc_star").hide();
}
}
} else {
document.getElementById('comment_page').value = '';
document.getElementById('comment_url').value = './view_comment.page.php?bo_table=<?php echo $bo_table;?>&wr_id=<?php echo $wr_id;?>&crows=<?php echo $crows;?>';
//별점
document.getElementById('wr_star').value = 5;
$("#bo_vc_star").show();
}
if(save_before)
$("#captcha_reload").trigger("click");
save_before = el_id;
} <code>else if(comment_id){</code></p>
<p> <code>comment_box('', 'c');</code></p>
<p> <code>}</code></p>
<p> }
function comment_delete()
{
return confirm("이 댓글을 삭제하시겠습니까?");
}
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
// sns 등록
$(function() {
$("#bo_vc_send_sns").load(
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
function() {
save_html = document.getElementById('bo_vc_w').innerHTML;
}
);
});
<?php } ?>
</script>
<?php } ?>
<?php } else { ?>
답변에 대한 댓글 2개
프로그램 무식인지라 이렇게 큰도움을 받으니 너무 기쁘네요! 채택을 두분한테 드리고 싶은데 선채택 못드려서 너무 죄송합니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인

퇴근하다가 접촉사고가나서 바로 못해보는게 한입니다
항상 행복하세요!