웹마스터 팁

http://www.zeroboard.com/?mid=xe_issuetracker&d=1&search_target=title&search_keyword=포인트&d_no=1&d_status=1&d_regdate=1&d_assignee=1&d_writer=1&document_srl=17154543

이전에 나온 문제입니다만,

글 쓸때 마다 포인트가 줄어드는 게시판에
포인트가 0점일 때도 글을 작성할 수 있다.

는 문제에 대한 해결 소스 입니다.

         /**
         * @brief 글 작성 화면 출력
         **/
        function dispBoardWrite() {
            // 권한 체크
            if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');

            // check point
            if(Context::get('is_logged')) {
                $logged_info = Context::get('logged_info');
                $oPointModel = &getModel('point');
                $current_point = $oPointModel->getPoint($logged_info->member_srl);
                $oModuleModel = &getModel('module');
                $point_config = $oModuleModel->getModuleConfig('point');
                $module_srl = Context::get('module_srl');
                $current_module_point = ($point_config->module_point[$module_srl]['insert_document']? $point_config->module_point[$module_srl]['insert_document'] : $point_config->insert_document);
                if ($current_point + $current_module_point < 0) return $this->dispBoardMessage('msg_not_enough_point');
                debugPrint ('cur = '.$current_point.' mod = '.$current_module_point );
            }


            $oDocumentModel = &getModel('document');



포인트를 검사하는 부분을 추가시켰습니다. 다른분이 더 좋은 소스를 알려주시는것도 좋을 것 같네요 :)

아 그리고 $lang->msg_not_enough_point 라는 메시지는 적당히 추가해주면 됩니다.

"포인트가 부족합니다" 정도는 어떨까요?
제목 글쓴이 날짜
아이프레임 나나나나난 2008.09.18
호스팅 하시는 분들 서버사용량 줄이세요.. [8] ☆쫑 2008.09.19
제로보드 첨부파일 [4] 아싸수리 2008.09.19
"권한이 없습니다." Alert 창 대신 로그인 화면으로 이동시키기 [4] Slur 2008.09.22
글이나 코멘트에서 글자수 제한하기 老姜君 2008.09.23
첨부파일이 다운로드 되지 않을떄.. [2] 규민 2008.09.23
● 탈퇴버튼 없애기 - - ; [4] Eris 2008.09.23
제로보드XE 중복설치방법 있나요? [4] bsy.myid.net 2008.09.24
XAMPP 프로그램사용시 Error500 이 뜰경우 해결방법 [2] 지레프 2008.09.26
VPN 환경에서 제로보드 [4] superion 2008.09.26
메뉴 모듈 기능 조금 추가 [23] [1] file 반도체맨 2008.09.29
아이디/비밀번호 찾기 메일안올때 확인사항 (리눅스) [3] 이영길 2008.09.29
[권한이 없습니다] 권한에 따른 다른 메시지 출력하기 [10] [1] 반도체맨 2008.10.03
감점되는 게시판에서 점수 부족한데 글 써지는 문제점 수정 [1] 반도체맨 2008.10.07
제로보드XE에 온클럽(onclub) 달기 (UTF-8 문제) 맛있는고기 2008.10.07
웹사이트 업로드 문제 - OI 에러 드디어 고치다. [3] paulkim 2008.10.07
캘린더 위젯 여러개 사용하기 [3] file 김초호 2008.10.07
사이트 접속시 자동으로 www. 붙어서 접속되게 하기 [9] 다케루 2008.10.08
SPAM IP를 찾아 막기 [2] phantomi 2008.10.10
상단메뉴 레이어메뉴 위치 디테일하게 조정하기 [1] file HomeBox™ 2008.10.10