https://sir.kr/qa/549580
내용을 토대로 팁으로 작성합니다.
사용하시는 게시판 스킨으로 이동 해주세요

스킨 디렉토리를 참조 하시면 됩니다.
그리고 해당 스킨 디렉토리 내 write_comment_update.head.skin.php 파일을 생성합니다.
해당 파일이 없다면 생성 해야 하며, 있다면 코드만 추가 해주세요
아래 코드를 넣어주시면 됩니다.
[code]
<?php
if (!defined('_GNUBOARD_')) exit;
$comment_cnt = sql_fetch(" select count(*) as cnt from $write_table where wr_is_comment = '1' and mb_id = '{$member['mb_id']}' and substring(`wr_datetime`,1,10) = '". G5_TIME_YMD ."'");
$comment_max = 4; //하루에 포인트를 부여할 댓글쓰기 회수
// 하루에 댓글쓰기 횟수가 최대회수를 넘었다면
if ($comment_cnt['cnt'] >= $comment_max) {
$board['bo_comment_point'] = 0; // 댓글쓰기 포인트 지급 0
}
[/code]
만약 해당 파일이 있다면 아래 코드만 넣어주세요
[code]
$comment_cnt = sql_fetch(" select count(*) as cnt from $write_table where wr_is_comment = '1' and mb_id = '{$member['mb_id']}' and substring(`wr_datetime`,1,10) = '". G5_TIME_YMD ."'");
$comment_max = 4; //하루에 포인트를 부여할 댓글쓰기 회수
// 하루에 댓글쓰기 횟수가 최대회수를 넘었다면
if ($comment_cnt['cnt'] >= $comment_max) {
$board['bo_comment_point'] = 0; // 댓글쓰기 포인트 지급 0
}
[/code]
이렇게 되면, 하루에 댓글 포인트를 제한 할 수 있습니다.
응용)
게시글도 함께 제한하기
write_update.head.skin.php 파일 생성 혹은 코드 추가
[code]
<?php
if (!defined('_GNUBOARD_')) exit;
// 게시글 수 확인
$write_cnt = sql_fetch(" select count(*) as cnt from $write_table where wr_is_comment = '0' and mb_id = '{$member['mb_id']}' and substring(`wr_datetime`,1,10) = '". G5_TIME_YMD ."'");
$write_max = 4; //하루에 포인트를 부여할 게시글쓰기 횟수
// 하루에 게시글쓰기 횟수가 최대 횟수를 넘었다면
if ($write_cnt['cnt'] >= $write_max) {
$board['bo_write_point'] = 0; // 게시글쓰기 포인트 지급 0
}
[/code]
고맙습니다.
댓글 10개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24149 | |
| 24140 | |
| 24133 | |
| 24125 | |
| 24119 | |
| 24109 | |
| 24105 | |
| 24101 | |
| 24093 | |
| 24089 | |
| 24077 | |
| 24074 | |
| 24071 | |
| 24070 | |
| 24067 | |
| 24056 | |
| 24050 | |
| 24046 | |
| 24043 | |
| 24040 | |
| 24037 | |
| 24036 | |
| 24035 | |
| 24034 | |
| 24021 | |
| 24017 | |
| 24005 | |
| 24002 | |
| 23990 | |
| 23980 |

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