게시물당 댓글 포인트 1회만
1. 다음 파일을 복사
bbs/delete_comment.php ==>board_skin_path/delete_comment.head.skin.php
bbs/write_comment_update.php ==>board_skin_path/write_comment_update.head.skin.php
bbs/write_comment_update.php ==>board_skin_path/write_comment_update.head.skin.php
2. board_skin_path/delete_comment.head.skin.php 수정하기
<?
// 코멘트 삭제 <== 삭제
include_once("./_common.php"); <== 삭제
// 코멘트 삭제 <== 삭제
include_once("./_common.php"); <== 삭제
// 4.1 <== 삭제
@include_once("$board_skin_path/delete_comment.head.skin.php"); <== 삭제
@include_once("$board_skin_path/delete_comment.head.skin.php"); <== 삭제
$write = sql_fetch(" select * from $write_table where wr_id = '$comment_id' ");
.
. 다음 내용 참고하며 수정; 삭제를 먼저하고, 해당 게시물에 자기가 쓴 댓글이 없으면( $myccnt < 1) 포인트 내역 삭제, 셋째 파라미터 수정
.
$row = sql_fetch($sql);
if ($row[cnt] && !$is_admin)
alert("이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다.");
if ($row[cnt] && !$is_admin)
alert("이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다.");
// 코멘트 삭제
sql_query(" delete from $write_table where wr_id = '$comment_id' ");
sql_query(" delete from $write_table where wr_id = '$comment_id' ");
list( $myccnt)= mysql_fetch_row( mysql_query( "select count(*) from $write_table where mb_id='{$write['mb_id']}' and wr_is_comment > 0 and wr_parent={$write['wr_parent']} "));
if( $myccnt < 1) { // if there is no comment
// 코멘트 point 삭제
if (!delete_point($write[mb_id], $bo_table, $write['wr_parent'], '코멘트'))
insert_point($write[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_parent]}-{$comment_id} 코멘트삭제");
}
// 코멘트 point 삭제
if (!delete_point($write[mb_id], $bo_table, $write['wr_parent'], '코멘트'))
insert_point($write[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_parent]}-{$comment_id} 코멘트삭제");
}
// 코멘트가 삭제되므로 해당 게시물에 대한 최근 시간을 다시 얻는다.
$sql = " select max(wr_datetime) as wr_last from $write_table where wr_parent = '$write[wr_parent]' ";
$row = sql_fetch($sql);
$sql = " select max(wr_datetime) as wr_last from $write_table where wr_parent = '$write[wr_parent]' ";
$row = sql_fetch($sql);
.
.
.
// 사용자 코드 실행 <== 삭제
@include_once("$board_skin_path/delete_comment.skin.php"); <== 삭제
// 4.1 <== 삭제
@include_once("$board_skin_path/delete_comment.tail.skin.php"); <== 삭제
@include_once("$board_skin_path/delete_comment.skin.php"); <== 삭제
// 4.1 <== 삭제
@include_once("$board_skin_path/delete_comment.tail.skin.php"); <== 삭제
goto_url("./board.php?bo_table=$bo_table&wr_id=$write[wr_parent]&cwin=$cwin&page=$page" . $qstr);
?>
?>
3. board_skin_path/write_comment_update.head.skin.php 수정하기
<?
include_once("./_common.php"); <== 삭제
include_once("./_common.php"); <== 삭제
// 090710 <== 삭제
if (substr_count($wr_content, "&#") > 50) { <== 삭제
alert("내용에 올바르지 않은 코드가 다수 포함되어 있습니다."); <== 삭제
exit; <== 삭제
} <== 삭제
if (substr_count($wr_content, "&#") > 50) { <== 삭제
alert("내용에 올바르지 않은 코드가 다수 포함되어 있습니다."); <== 삭제
exit; <== 삭제
} <== 삭제
@include_once("$board_skin_path/write_comment_update.head.skin.php"); <== 삭제
$g4[title] = $wr_subject . "코멘트입력"; <== 삭제
.
. 다음 내용 참고하여 수정 insert_point() 다섯째 파라미터 수정
.
// 포인트 부여
insert_point($member[mb_id], $board[bo_comment_point], "$board[bo_subject] {$wr_id}-{$comment_id} 코멘트쓰기", $bo_table, $wr_id, '코멘트');
insert_point($member[mb_id], $board[bo_comment_point], "$board[bo_subject] {$wr_id}-{$comment_id} 코멘트쓰기", $bo_table, $wr_id, '코멘트');
.
.
.
sql_query($sql);
}
}
// 사용자 코드 실행 <== 삭제
@include_once("$board_skin_path/write_comment_update.skin.php"); <== 삭제
@include_once("$board_skin_path/write_comment_update.tail.skin.php"); <== 삭제
@include_once("$board_skin_path/write_comment_update.skin.php"); <== 삭제
@include_once("$board_skin_path/write_comment_update.tail.skin.php"); <== 삭제
goto_url("./board.php?bo_table=$bo_table&wr_id=$wr[wr_parent]&page=$page" . $qstr . "&cwin=$cwin#c_{$comment_id}");
?>
?>
댓글 8개
14년 전
좋은 팁 감사합니다
14년 전
좋은 정보 감사합니다 ^^
~~~~
~~~~
WEBUS
14년 전
감사합니다.
14년 전
좋은자료 감사합니다.
14년 전
1. 다음 파일을 복사
bbs/delete_comment.php ==>board_skin_path/delete_comment.head.skin.php
bbs/write_comment_update.php ==>board_skin_path/write_comment_update.head.skin.php
여기서
==>board_skin_path/write_comment_update.head.skin.php
이게 뭘말하는지 모르겠습니다.
스킨폴더로 보내라는 건지요?
bbs/delete_comment.php ==>board_skin_path/delete_comment.head.skin.php
bbs/write_comment_update.php ==>board_skin_path/write_comment_update.head.skin.php
여기서
==>board_skin_path/write_comment_update.head.skin.php
이게 뭘말하는지 모르겠습니다.
스킨폴더로 보내라는 건지요?
14년 전
해당 스킨 디렉터리에 복사하시면 됩니다.
14년 전
이렇게 해도 안되는데요?
doodlin
13년 전
좋은 자료 감사합니다
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3309 | 3년 전 | 1798 | ||
| 3308 | 11년 전 | 2087 | ||
| 3307 |
uPAmJ903
|
6년 전 | 4742 | |
| 3306 |
바른사나이
|
6년 전 | 3269 | |
| 3305 | 6년 전 | 12297 | ||
| 3304 | 7년 전 | 3699 | ||
| 3303 | 7년 전 | 3736 | ||
| 3302 |
지리산초보
|
7년 전 | 13588 | |
| 3301 |
sozet
|
8년 전 | 4897 | |
| 3300 |
sozet
|
8년 전 | 5962 | |
| 3299 |
sozet
|
8년 전 | 10855 | |
| 3298 | 8년 전 | 4008 | ||
| 3297 |
또치하우스
|
8년 전 | 4433 | |
| 3296 | 8년 전 | 11961 | ||
| 3295 |
또치하우스
|
8년 전 | 14978 | |
| 3294 | 8년 전 | 6016 | ||
| 3293 | 8년 전 | 5583 | ||
| 3292 |
|
9년 전 | 5309 | |
| 3291 | 9년 전 | 13673 | ||
| 3290 | 9년 전 | 5042 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기