[통합검색] 통합검색할때 회원별 권한에 따라 내용 보여주기
2016.02.23 18:03
61
0
https://eond.com/372282
object(HotopayModel)#817 (23) { ["error"]=> int(0) ["message"]=> string(7) "success" ["variables"]=> array(0) { } ["httpStatusCode"]=> int(200) ["module"]=> string(7) "hotopay" ["module_info"]=> NULL ["origin_module_info"]=> NULL ["module_config"]=> NULL ["module_path"]=> string(52) "/home/eond/web/eond.com/public_html/modules/hotopay/" ["xml_info"]=> NULL ["module_srl"]=> NULL ["mid"]=> NULL ["act"]=> NULL ["template_path"]=> NULL ["template_file"]=> NULL ["layout_path"]=> NULL ["layout_file"]=> NULL ["edited_layout_file"]=> NULL ["stop_proc"]=> bool(false) ["user"]=> object(Rhymix\Framework\Helpers\SessionHelper)#816 (20) { ["member_srl"]=> int(0) ["user_id"]=> NULL ["user_name"]=> NULL ["nick_name"]=> NULL ["email_address"]=> NULL ["phone_number"]=> NULL ["homepage"]=> NULL ["blog"]=> NULL ["birthday"]=> NULL ["denied"]=> NULL ["status"]=> NULL ["is_admin"]=> string(1) "N" ["is_site_admin"]=> NULL ["profile_image"]=> NULL ["image_name"]=> NULL ["image_mark"]=> NULL ["signature"]=> NULL ["description"]=> NULL ["group_list"]=> array(0) { } ["menu_list"]=> array(0) { } } ["request"]=> object(Rhymix\Framework\Request)#10 (13) { ["method"]=> string(3) "GET" ["compat_method"]=> string(3) "GET" ["url"]=> string(17) "xe/372282/page/23" ["hostname"]=> string(8) "eond.com" ["domain"]=> NULL ["protocol"]=> string(5) "https" ["callback_function"]=> string(0) "" ["_route_status":protected]=> int(200) ["_route_options":protected]=> object(stdClass)#11 (5) { ["cache_control"]=> bool(true) ["check_csrf"]=> bool(true) ["is_forwarded"]=> bool(false) ["is_indexable"]=> bool(true) ["enable_session"]=> bool(true) } ["module"]=> string(5) "board" ["mid"]=> string(2) "xe" ["act"]=> string(16) "dispBoardContent" ["args"]=> array(6) { ["category"]=> string(5) "35024" ["search_target"]=> string(9) "nick_name" ["document_srl"]=> string(6) "372282" ["page"]=> int(1) ["mid"]=> string(2) "xe" ["act"]=> string(16) "dispBoardContent" } } ["ajaxRequestMethod"]=> array(2) { [0]=> string(6) "XMLRPC" [1]=> string(4) "JSON" } ["gzhandler_enable"]=> bool(true) }

제가 능력이 모자라서, 스킨수정으로 만들었습니다.

 

module/ integraion_search / skin /document.html

 

파일에서 

 

 <ul class="searchResult"> </ul> 의 사이의 코드를

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{@ 
    $logged_info = Context::get('logged_info');
    $oModuleModel = &getModel('module');
    }
    <!--@foreach($output->data as $no => $document)-->
    {@ 
    $module $oModuleModel->getModuleInfoByDocumentSrl($document->get('document_srl'));
    $gg $oModuleModel->getGrant($module$logged_info);
 
    }
    <!--@if($gg->view)-->
 
        <li>
[{$module->browser_title}]
            <!--@if($document->thumbnailExists(80))-->
            <a href="{getUrl('','document_srl',$document->document_srl)}" onclick="window.open(this.href);return false;"><img src="{$document->getThumbnail(80)}" alt="" width="80" height="80" class="thumb" /></a>
            <!--@end-->
            <dl>
                <dt><a href="{getUrl('','document_srl',$document->document_srl)}" onclick="window.open(this.href);return false;">{$document->getTitle()}</a> <!--@if($document->getCommentCount())--><span class="reply">[<em>{$document->getCommentCount()}</em>]</span> <!--@end--></dt>
 
                <dd>{$document->getSummary(200)}</dd>
            </dl>
            <address><strong>{$document->getNickName()}</strong> | <span class="time">{$document->getRegdate("Y-m-d H:i")}</span> | <span class="read">{$lang->readed_count}</span> <span class="readNum">{$document->get('readed_count')}</span><!--@if($document->get('voted_count'))--> | <span class="recom">{$lang->voted_count}</span> <span class="recomNum">{$document->get('voted_count')}</span><!--@end--></address>
 
        </li>
        <!--@end-->
    <!--@end-->

 

를 넣어주시면 됩니다. 

 

간단하게 설명드리면, logged_info와 모듈정보를 받아서 권한체크 해서 스킨에서 제외시켜줬습니다.

 

comment 는 $document->docment_srl을 $comment->document->srl

file과 멀티미디어는  $file->target_srl, $image->target_srl 로 넣어서 변경해주시면 됩니다.

 

단점이 검색시에 페이지와 검색숫자가 변경이 안됩니다.

 

view에서 걸러주면 좋을거 같은데.. 전 문서의 module을 불러와서 새로 module_srl_list를 만드는 법을 잘 모르겠어요

 

능력자님이 해주실 거라고 봅니다. ^^ 

 

권한에 관한 코드는 전에 컨텐츠위젯을 권한적용해놓으신 분것을 참고했습니다. 기억이 잘.. 

라이믹스는 이온디와 함께

닫기

마이페이지

로그인을 해주세요

네이버로 로그인