[사용팁] 태그 목록 ver 0.1 위젯을 출력을 시간단위로 수정 부탁드립니다.
2018.01.01 21:07
47
0
https://eond.com/395923
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/395923/page/15" ["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) "395923" ["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) }

http://www.xpressengine.com/index.php?&mid=download&package_srl=18324360


태그 위젯이 쌓이는 태그 만큼 가져 오는데.. 계속 노출 되는 것만 노출이 되네요.

이걸 추가로 24시간 48시간. 등의 시간 단위내에 쌓인걸 가져오고 싶습니다.


1.

xe - widgets - tag_list - conf - info.xml 열고
<var id="hours">
 <type>text</type>
 <name xml:lang="ko">시간범위</name>
 <description xml:lang="ko">단위는 시간(숫자만 입력).</description>
</var>
이것 추가

 

2.
xe - modules - tag - queries - getTagList.xml 열고
line 7 쯤에
<column name="tag" />
<column name="T.regdate" />

<column name="count(*)" alias="count" />
여기서 붉은 색 추가......

 

3.
xe - widgets - tag_list - tag_list.class.php 열고
line 19 쯤에
$title = $args->title;
이것 바로 아래에
$hours = preg_match('/[^0-9]/', $args->hours)?'':$args->hours;
이것 추가

 

그리고
line 65 쯤에
foreach($output->data as $key => $val) {
이것 바로 아래에
if($hours&&$val->regdate<date('YmdHis', strtotime('-'.$hours.' hours'))) continue;

이것 추가

 

위젯 설정에서 시간을 입력하고 저장하면 됩니다.......

 

https://www.xpressengine.com/qna/21017309

라이믹스는 이온디와 함께

닫기

마이페이지

로그인을 해주세요

네이버로 로그인