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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23966 | |
| 23963 | |
| 23953 | |
| 23949 | |
| 23938 | |
| 23935 | |
| 23933 | |
| 23928 | |
| 23919 | |
| 23918 | |
| 23917 | |
| 23910 | |
| 23902 | |
| 23901 | |
| 23897 | |
| 23894 | |
| 23893 | |
| 23891 | |
| 23885 | |
| 23872 | |
| 23870 | |
| 23862 | |
| 23859 | |
| 23853 | |
| 23845 | |
| 23838 | |
| 23827 | |
| 23819 | |
| 23805 | |
| 23801 |

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