다른 분이 글 작성 전에는 연속으로 2개까지만 작성 제한하기 정보
다른 분이 글 작성 전에는 연속으로 2개까지만 작성 제한하기본문
베이직 스킨 write.skin.php에 적용합니다.
다른 사람 글이 올라오기 전에 계속 글쓰기 제한하기
다른 분들의 팁을 보니 bbs/*.php 파일을 수정하고 있드군요. 그런 경우
버전업을 하게 되게 될 때 마다 수정하는 것이 불편하여 스킨에 적용하도록 ...
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor.lib.php");
echo "<script src='$g4[editor_path]/cheditor.js'></script>";
echo cheditor1('wr_content', $content);
}
include_once("$g4[path]/lib/cheditor.lib.php");
echo "<script src='$g4[editor_path]/cheditor.js'></script>";
echo cheditor1('wr_content', $content);
}
//다른 회원 글 작성전 2개까지 제한
if ($w == "") {
$mb_id = $member['mb_id'];
$mb_name = $member['mb_name'];
$sql = " select wr_name, mb_id from {$g4[write_prefix]}{$bo_table} where wr_is_comment = '0' order by wr_id desc limit 0, 2 ";
$result = sql_query($sql);
$mb_id1 = mysql_result($result,0,"mb_id"); // 1번글 아이디
$mb_id2 = mysql_result($result,1,"mb_id"); // 2번글 아이디
if(($mb_id == $mb_id1) && ($mb_id == $mb_id2)) {
alert("$mb_name($mb_id)님 다른분이 글 작성 전에는 연속으로 2개까지만 작성 제한 게시판입니다!!");
}
} // 글작성 제한 끝
?>
추천
0
0
댓글 7개
write.head.skin.php +_+
write_update.head.skin.php 이 파일에도.. 동일하게
왜냐면 글 작성하고,
뒤로 버튼 누른 뒤 글을 쓰면 재미있는 결과가~
뒤로 버튼 누른 뒤 글을 쓰면 재미있는 결과가~
감사합니다. 추가팁도 감사합니다~
유용한 소스 감사합니다.
연속 글 제한
감사 합니다.