묻고답하기

해당 위젯에는 코드중 일부를 뽑아봤습니다.

위젯설정에서 선택한 모듈(게시판)의 총 글수를 뽑아서 목록수에 적용시키려 합니다.

어떤 부분을 어떻게 고쳐주면 될런지요.


            // 목록수 수
            $widget_info->cols_list_count = (int)$args->cols_list_count;
            if(!$widget_info->cols_list_count) $widget_info->cols_list_count = 3;

            // 대상 모듈이 선택되어 있지 않으면 해당 사이트의 전체 모듈을 대상으로 함
            $site_module_info = Context::get('site_module_info');
            if($args->module_srls) $obj->module_srls = $args->module_srls;
            else if($site_module_info) $obj->site_srl = (int)$site_module_info->site_srl;

            $obj->direct_download = 'Y';
            $obj->isvalid = 'Y';

            // 정해진 모듈에서 문서별 파일 목록을 구함
            $obj->list_count = $widget_info->rows_list_count*$widget_info->cols_list_count;
            $files_output = executeQueryArray("file.getOneFileInDocument", $obj);
            $files_count = count($files_output->data);

            $document_srl_list = array();
            $document_list = array();

            $oDocumentModel = &getModel('document');
            if($files_count>0) {
                for($i=0;$i<$files_count;$i++) $document_srl_list[] = $files_output->data[$i]->document_srl;

                $tmp_document_list = $oDocumentModel->getDocuments($document_srl_list);
                if(count($tmp_document_list)) {
                    foreach($tmp_document_list as $val) $document_list[] = $val;
                }
            }

            $document_count = count($document_list);
            $total_count = $widget_info->rows_list_count * $widget_info->cols_list_count;
            for($i=$document_count;$i<$total_count;$i++) $document_list[] = new DocumentItem();
            $widget_info->document_list = $document_list;

            // 모듈이 하나만 선택되었을 경우 대상 모듈 이름과 링크를 생성
            $module_srl = explode(',',$args->module_srls);
            if(count($module_srl)==1) {
                $oModuleModel = &getModel('module');
                $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl[0]);
                if($module_info->site_srl) {
                    $site_info = $oModuleModel->getSiteInfo($module_info->site_srl);
                    if($site_info->domain) {
                        $widget_info->more_link = getSiteUrl('http://'.$site_info->domain, '','mid', $module_info->mid);
                    }
                } else {
                    $widget_info->more_link = getUrl('','mid',$module_info->mid);
                }
                $widget_info->module_name = $module_info->mid;
            }

            Context::set('widget_info', $widget_info);


글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
윤지아빠 textyle 생성 문제  
개발. 설문조사를 한명하면 더이상 참여할수가 없네요.. [1] 2009.12.10 by 백성찬
ByeolSatang 테이블 안의 배경이미지가 안나와요 [1] file 2009.12.10 by 행복한고니
youmei21 한글/영어 버전 홈페이지를 따로 나누려고 하는데요.. [6] 2009.12.10 by youmei21
리어코리아 [100] phpmyadmin import 오류 [1] 2009.12.10 by 행복한고니
김남철574 고수님들 꼭 읽어보시고 해결 방법 좀 알려주세요 [1] 2009.12.10 by 행복한고니
인도파트너 로고의 URL을 어떻게 바꾸는지 가르쳐 주시면 고맙겠습니다! [1] 2009.12.10 by 행복한고니
된장맛껌 phpMyAdmin에서 아이디를 일괄 변경하는 방법 [1] 2009.12.10 by 행복한고니
김성걸310 레이아웃에 위젯넣을 때 위젯 스타일 적용  
demun xe폴더에 설치했을경우 시작페이지 설정 [2] 2009.12.10 by pdos
미누7 서버이전시.. 백업한 ".sql" DB파일을 어디다올리나요? [1] 2009.12.10 by pdos
멀루할까 친구보기 쪽지보기등 옵션에대한질문요  
BBBBBBBB 댓글수,조회수 없애기~ file  
ByeolSatang XE 어떤 CSS파일을 수정해야 할까요? [2] 2009.12.10 by ByeolSatang
BBBBBBBB 관리자 페이지 [1] file 2009.12.10 by BBBBBBBB
멀루할까 준회원 일괄 정회원 만드는법 [1] 2009.12.10
보해양조 카페24와 연동하여 제로보드를 썼는데.....  
WebNarLa 레이아웃을 만들려고하는데  
웰빙샵 지영 영어 사이트, 한국어 사이트...기본 언어설정??  
creent 레이아웃을 제작하려 하는데, 여백이 없어지지 않아요... [1] 2009.12.11 by While
totok 카페생성 메인 페이지에서 배너이미지 안짤리게 꼭 조언 부탁드려요 (사진첨부) file  
나다나다 외국계정 제로보드4 설치문의 [2] 2009.12.11 by 그의흔적
DuRi 본문내 이미지 조절 애드온(resize_image)이 정상 동작하지 않는 문제 질문입니다. [1] 2009.12.11 by DuRi
zerozerozero 상단 컬러를 바꾸고 싶어요ㅠㅜ file  
윤정식709 모듈에러좀 봐주세요 [1] 2009.12.11 by 봄이조아
미누7 서버이전, DB복구 제가 해봤는데 맞는지봐주세요!ㅠ (그림有) [1] 2009.12.11 by 백성찬
alljoy ftp 절대경로 입력문제 [1] file 2009.12.11 by 백성찬
쉐굴 url의 동작이 이상해요. 도와주세요 ㅠㅠ  
우등생 회원가입시 권한이 없다고 뜨는데.. 어떻게 하죠??  
머구리 위젯이 작동이 안되요