XpressEngine [레벨:0]gc00 2011.12.22 13:02

대책없는 스팸때문에....

회원당 하루에 등록글 가능 횟수 제한을 줄수 없을까요?



[레벨:25]송동우 2011.12.22 15:17

xe - modules - board - skins - xe_official - write_form.html
최상단에


{@
 $allowed_write = 1;
 $today = date(Ymd)."000000";
 $oDB = &DB::getInstance();
 $query = $oDB->_query('select count(*) as total from xe_documents where member_srl='.$logged_info->member_srl.' and module_srl='.$module_info->module_srl.' and regdate > '.$today);
 $result = $oDB->_fetch($query);
}


이것 삽입

붉은 색 숫자는 제한 갯수


그리고 아래에

<p cond="$result->total >= $allowed_write"> no more {$allowed_write} a day</p>
<form action="./" method="post" onsubmit="jQuery(this).find('input').each(function(){if(this.title==this.value)this.value='';});return procFilter(this, window.insert)" id="fo_write" class="boardWrite" cond="$result->total < $allowed_write || $logged_info->is_admin=='Y'">
여기서 파란색 부분이 추가된 내용

녹색 부분은 선택사항입니다(제한에 걸렸을 때 나타날 메세지)

 

테스트 환경 : core 1.4.5.10 / board 1.3.1 / xe_official스킨

 

http://www.xpressengine.com/20357456 에서