로그인

검색

Extra Form
추천지수 6

타임라인 모듈에 연동하여 미리 지정한 조건에 만족한 글들을 필터링 해서 보여줄 수 있는 애드온이 유료로 판매되고 있습니다.

https://webstack.me/store/4804

 

타임라인 모듈로 일일이 개별 게시판에 대응하는 인기,베스트 게시판을 따로 별도로 만들 필요 없이 해당 게시판에서 바로 정렬해서 보여줍니다.

 

 

이 인기글 혹은 베스트 글을 보여주기 위한 url을 버튼이나 정렬 옵션에서 사용하게 해줘야 방문자들이 누르거나 선택해서 사용할 수 있을 겁니다.

 

애드온에서 변수들을 제공하니 적절한 변수를 사용하면 인기글이 제공되는 게시판에서만 해당 버튼이나 정렬옵션에 나오게 할 수 있습니다.

 

인기글(베스트) 버튼을 따로 만들어 목록을 출력하는 곳에 적당한 곳에 넣어주면 쉽게 보고 사용하겠죠.

 

filter_01.png

 

위와 같이 애드온에 의해서 인기 또는 베스트 글을 제공할 수 있는 게시판에서만 저렇게 인기글 목록 이라는 버튼이 나오게 됩니다.

 

제가 만든 것 기준으로 알려드리면

 

<block cond="$filter_mode_enabled">
<a href="{getUrl('filter_mode', 'popular', 'page', 1)}" cond="!$filter_mode_activated">인기글 목록</a>
<a href="{getUrl('filter_mode', '')}" cond="$filter_mode_activated">일반 목록</a>
</block>

 

위와 같이 작성하면 됩니다. 

 

filter_mode', 'popular' 의 경우는 저희는 인기글을 사용했기 때문이기에 best 또는 custom을 사용한다면 바꿔야 겠죠??

 

 

 

그리고 한가지 더 게시판에서 원래 제공하는 "정렬옵션"에 이 인기글을 추가해 줄 수 있을 것입니다.

 

스크린샷(113).png

 

 

이렇게 정렬옵션에 인기글 출력하는  url을 추가해 주면 쓰임새가 더 있겠죠??

 

 

 

 

 

 

스크린샷(114).png

 

정렬옵션을 인기글을 선택하면 인기글만 필터링되어서 목록이 보여지고 정렬옵션이 인기글로 선택되었다고 보여집니다.

 

 

 

저희 스킨 기준이니 다른 스킨은 참조를 하셔서 적용하셔야 합니다.

 

{@ 
    if($sort_index == 'regdate'): $_sort_text = $lang->date;
    elseif($sort_index == 'update_order'): $_sort_text = $lang->last_update;
    elseif($sort_index == 'readed_count'): $_sort_text = $lang->readed_count;
    elseif($sort_index == 'voted_count'): $_sort_text = $lang->voted_count;
    elseif($sort_index == 'blamed_count'): $_sort_text = $lang->blamed_count;
    elseif($filter_mode == 'popular'): $_sort_text = '인기글';
    endif;
}

 

<button class="bt bt_sort closed" type="button">
    <!--@if($sort_index || $filter_mode)-->정렬 기준({$_sort_text})<!--@else-->정렬 기준<!--@end-->
    <i class="fas fa-angle-down"></i>
</button>
<ul class="black_bubble">
<li><a href="{getUrl('sort_index','')}">기본</a></li>
<li cond="$list_config['regdate']"><a href="{getUrl('sort_index','regdate','order_type',$order_type,'filter_mode', '')}">{$lang->date}</a></li>
<li cond="$list_config['last_post']"><a href="{getUrl('sort_index','update_order','order_type',$order_type,'filter_mode','')}">{$lang->last_update}</a></li>
<li cond="$list_config['readed_count']"><a href="{getUrl('sort_index','readed_count','order_type',$order_type,'filter_mode','')}">{$lang->readed_count}</a></li>
<li cond="$list_config['voted_count']"><a href="{getUrl('sort_index','voted_count','order_type',$order_type,'filter_mode','')}">{$lang->voted_count}</a></li>
<li cond="$list_config['blamed_count']"><a href="{getUrl('sort_index','blamed_count','order_type',$order_type,'filter_mode','')}">{$lang->blamed_count}</a></li>
<li cond="$filter_mode_enabled"><a href="{getUrl('sort_index','','filter_mode', 'popular', 'page', 1)}">인기글</a></li>

 

 

파란색 부분은 기존 코드에 추가된 부분입니다. 인기글 변수가 작동하지 않도록 기존 정렬옵션에는 모두  ,'filter_mode','' 를 추가해 주었습니다.

그리고 여기도 마찬가지로 'filter_mode', 'popular' 는 인기글 기준이니 다른것을 사용하는 경우 적절히 바꿔주세요.

 

 

*추가

 

혹시 베스트,인기글 버튼 두개를 모두 제공하고 싶다면

<block cond="$filter_mode_enabled">
<a href="{getUrl('filter_mode', 'popular', 'page', 1)}" cond="$filter_mode != 'popular'">인기글</a>
<a href="{getUrl('filter_mode', 'best', 'page', 1)}" cond="$filter_mode != 'best'">베스트</a>
<a href="{getUrl('filter_mode', '')}" cond="$filter_mode_activated">일반 목록</a>
</block>

 

Who's 꿀팁관리소장

profile
라이믹스로 커뮤니티 사이트를 운영하는 비개발자 운영자 입니다.
파트너쉽 맺으실 사이트 운영자분 환영합니다.
2 추천
Atachment
첨부 '0'

라이믹스 팁(112)

라이믹스 운영과 사용에 관한 팁을 공유 합니다.

  1. read more
  2. read more
  3. Read More
  4. Read More
  5. 스케치북 빵조각 '메뉴 아이콘' 적용해 보았습니다.

    Date2021.04.21 Category기능 Views169 Votes2
    Read More
  6. Read More
  7. 본문 게시글 주소 복사 버튼 여러곳에 추가해 주기 20

    Date2021.04.10 Category기능 Views263 Votes2
    Read More
  8. input 입력창 크기가 작거나 이상한가요? css box-sizing

    Date2021.04.09 Category기타 Views213 Votes3
    Read More
  9. 본문 게시글 주소 클립보드 복사 기능 만들기 23

    Date2021.04.06 Category기능 Views528 Votes2
    Read More
  10. Read More
  11. 라이믹스 2.0 회원 서명 높이를 조절 하고 싶다면

    Date2021.03.13 Category기능 Views193 Votes4
    Read More
  12. Read More
  13. Read More
  14. Read More
  15. Read More
  16. Flex 레이아웃 로그인 오류 메시지 안뜨는 문제 해결

    Date2021.01.31 Category오류 Views208 Votes2
    Read More
  17. Read More
  18. Read More
  19. Read More
  20. Read More
  21. Read More
  22. Read More
  23. Read More
  24. Read More
  25. Read More
  26. Read More
  27. Read More
  28. Read More
  29. Read More
  30. Read More
  31. Read More
  32. Read More
Prev 1 2 3 4 Next
/ 4