Extra Form
PHP PHP 7.2
CMS Rhymix

xe에서 라이믹스로 전환하면 기존 사용하던 마카롱 게시글 별점 모듈 ( https://xetown.com/thirdparties/1105087 )

의 별점순 정렬 기능이 작동하지 않습니다.

 

예시  : https://martmonster.com/review

 

해당 정렬기능은 코어에 해당 코드를 추가 하여야 하는데 라이믹스 코어에 추가하는 방법을 문의하려고 하니 해당 개발자분의 사이트가 열리질 않네요.

 

혹시 라이믹스에서 마카롱 게시글 별점 모듈을 이용 중 이신 분 계신가요?

 

아래 코드는 xe 코어에 게시판에서 별점순 정렬기능을 사용하기 위해 추가 하는 코드입니다.

modules/document/document.model.php

 

/**
     * Setting sort index
     * @param object $obj
     * @param bool $load_extra_vars
     * @return object
     마트몬 별점 정렬 추가 ,'rating'
     */
    function _setSortIndex($obj, $load_extra_vars)
    {
        $sortIndex = $obj->sort_index;
        $isExtraVars = false;
        if(!in_array($sortIndex, array('list_order','regdate','last_update','update_order','readed_count','voted_count','blamed_count','comment_count','trackback_count','uploaded_count','title','category_srl','rating')))
        {
            // get module_srl extra_vars list

 

 

modules/document/queries/getDocumentList.xml 

 <condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
            <!--//마트몬 별점 관련 추가-->
            <condition operation="more" column="rating" var="s_rating" pipe="or" />
        </group>

 

 

modules/board/board.class.php

/**
 * @class  board
 * @author NAVER ([email protected])
 * @brief  board module high class
 마트몬 별정모듈 관련 추가
 **/

class board extends ModuleObject
{
    var $search_option = array('title_content','title','content','comment','user_name','nick_name','user_id','tag'); ///< 검색 옵션

    var $order_target = array('list_order', 'update_order', 'regdate', 'voted_count', 'blamed_count', 'readed_count', 'comment_count', 'title', 'nick_name', 'user_name', 'user_id','rating'); // 정렬 옵션

 

 

 

  • profile

    해당 자료에서 게시판 사용자 정의 기능(=확장변수)을 사용하지 않는 것으로 보입니다.

    개인적으로 XE나 라이믹스나 코어 게시판의 스키마를 임의로 수정하는 자료는 사용을 권장드리고 싶지 않습니다. 추후 코어에 동일 이름의 컬럼이 추가되면 충돌이 생길 수 있으며 위 예시처럼 정렬 사용을 위해 코어를 수정하는 불편함이 있습니다.(사용자 정의 기능 사용시 코어 수정이 불필요합니다)

     

    수정 방법 자체는 라이믹스에도 적용이 가능할텐데요(물론 줄 수 등은 차이가 있을수 있습니다) 적용후 오류가 생긴다면 어떤 오류가 생기는지 첨부해서 질문주시는게 더 빠른 답변이 가능할것으로 보입니다.

  • profile ?
    답변감사합니다.
  • profile
    @마카롱 님께 XETOWN 쪽지 보내보세요
  • profile ?
  • profile
    마카롱님 사이트 도메인이 만료된 듯 하네요.