묻고답하기

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

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

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


            // 목록수 수
            $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 남기남
디자인소리 텍스타일 때문에 미치겠네요..ㅜㅜ  
김대한562 외부페이지 로딩속도가 많이 느리네요  
오대양 첨부이미지가 뜨지 않는 문제, 꼭 좀 도와주세요ㅜ [1] 2009.12.09 by 된장맛껌
하늘이22 고수라면 인차 알것 같은데 부탁 합니다. [1] 2009.12.09 by xeworks
윤지아빠 파일 비교문제 [1] 2009.12.09 by 된장맛껌
미친박군 위지웍 에이터가 활성화가 안됩니다. [3] file 2009.12.09 by 백성찬
모노로그 XE가 느려지고 글쓰기 장애가 발생합니다. [2] 2009.12.09 by 老姜君
멀루할까 글쓰기, 목록등 게시판 기본옵션이없어요 ㅠ [5] file 2009.12.09 by 멀루할까
똥카 갠홈 리뉴얼을 했는데 이상하게 나와여ㅠㅠ미치겟네요  
miss오랜지 호스팅 바꾸면 어떻게하죠? [2] 2009.12.09 by Gekkou
유서영895 board 모듈 게시판이 사라졌어요. 원래 안들어 있나요? [3] 2009.12.09 by 알프레드
원대한543 xe에서 수식입력하기  
ByeolSatang 레이아웃을 적용하니 일부위치에서 배경이 사라져 하얗게 나올까요? [1] file 2009.12.10 by xeworks
멀루할까 xe에 프레임은 어떻게 적용시키나여 [1] 2009.12.10 by xeworks
어라하 동영상메뉴얼이 대체 어디에 있습니까? [1] 2009.12.10 by Gekkou
알프레드 메일가입인증 절차를 없애고 그냥 가입 하는 방법 좀 알려주세요. [1] 2009.12.10 by 하늘03
teuysl1 FTP서버에 있는 제로보드4 파일을 모두 백업하려고 했는데 [1] 2009.12.10 by Gekkou
chinamakeup 지금 이곳 페이지처럼 로그인을 달고 싶습니다. [1] 2009.12.10 by 팔공산
미누7 서버이전할때.. db파일 백업후.. 복구하는 방법문의!  
문용식372 cafexe 로 카페를 만들어지지 않습니다.  
Planb 게시판에서 flv파일이 본문에서 보이지 않습니다. [1] file 2009.12.10 by 백성찬
eunbini textyle 설치 관련  
제로초짜 아이디/비밀번호찾기 메일발송시 메일에서 아무것도 안뜨는이유가뭔지모르겠습니다.  
juossin 데이터 이전후에 회원정보 동기화시 게시물에 닉네임대신 이름으로 변경  
juossin 메뉴관리에서 생성된 메뉴와 똑같은 메뉴 복사 [1] 2009.12.10 by juossin
멀루할까 로그인창에 대하여 질문드려요 ㅠ file  
윤정식709 테이블이 깨지는 현상  
괴짝 이곳에 플래시 파일넣으려면 소스를 어디다가 넣어줘야하나요? [1] file 2009.12.10 by 백성찬
한재성726 제로보드4에서 XE로의 업데이트 순서를 상세히 알려주세요 [1] 2009.12.10 by 백성찬
박병욱989 관리자 화면 오류 메시지좀 해석해주세요... [1] 2009.12.10 by 박병욱989