xe에서는 기본적으로 게시물출력순서가 no 순으로 되어있나봅니다.

db오류로 복구작업과 수작업 등을통해 등록순서가 뒤죽박죽이 되어, 각 게시판들은 '등록일 순' 으로 세팅하여 해결되었는데,

나의게시물? 작성글보기? 이 목록은 별도로 설정하는 곳이 없어서 꼼수로 a href='index.php?act=dispMemberOwnDocument&mid=Home&sort_index=regdate"

요렇게 해 봤더니 역시나 먹히질 않네요.

 

아래가 리스트를 출력해 주는 dispMemberOwnDocument() 함수인듯한데, 어떻게하면 게시물을 '등록일자(regdate)순으로 출력할 수 있을지 힌트 좀 주시면 감사하겠습니다.

 

module/member/member.view.php

 

 /**
     * @brief Display documents written by the member
     */
    function dispMemberOwnDocument()
    {
        $oMemberModel = getModel('member');
        // A message appears if the user is not logged-in
        if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');

        $logged_info = Context::get('logged_info');
        $member_srl = $logged_info->member_srl;

        $module_srl = Context::get('module_srl');
        Context::set('module_srl',Context::get('selected_module_srl'));
        Context::set('search_target','member_srls');
        Context::set('search_keyword', implode(',', array($member_srl, $member_srl * -1)));


        $oDocumentAdminView = getAdminView('document');
        $oDocumentAdminView->dispDocumentAdminList();

        $oSecurity = new Security();
        $oSecurity->encodeHTML('document_list...title', 'search_target', 'search_keyword');

        Context::set('module_srl', $module_srl);
        $this->setTemplateFile('document_list');
    }

  • ?
    dispDocumentAdminList 함수 자체가
    $args->sort_index = 'list_order'; 로 고정되어있습니다
    dispDocumentAdminList 함수를 직접 수정해야겠죠?
  • ?

    /modules/document/document.admin.view

    function dispDocumentAdminList()
    $args->sort_index = 'list_order'; // /< sorting value

    $args->sort_index = 'regdate asc'; // /< sorting value

    list_order 를 regdate 로 바꿔주면 되고, 오름차순 asc 이나 내림차순 desc 설정하시면 됩니다

  • profile
    감사합니다.
    두분덕분에 잘 해결했습니다.^^