묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
포인트경매시 남은시간 표시 바꾸는 법 좀 알려주세요.4
2013.05.03 00:01
안녕하세요.
함수에 연연하는 거는 아니구요.
기본 지식이 없어서 그러는 거에요.
아래 문제해결처럼, xe 문제해결시 어디에 있는 파일을 어떻게 바꿔넣으면 해결된다는 것 정도만 아는 수준입니다.
경매시간 표현 해결방안 비슷한 것을 찾았는데요.
아래 파일에 적용을 못하겠어요.
/public_html/xe/modules/beluxe/skins/auction/_lst.general.html
다른 파일도 총괄적으로 바꿔야 되나요?
검색을 해서 비슷한 것이 나와도 적용할 수 있는 수준이 안되서 그러는 겁니다.
-------------------------------------------------------------------------------
{@
$dis_category = $list_config['category_srl']->display == 'Y';
$dis_status = $list_config['custom_status']->display == 'Y';
$dis_readed = $list_config['readed_count']->display == 'Y';
$dis_voted = $list_config['voted_count']->display == 'Y';
$dis_blamed = $list_config['blamed_count']->display == 'Y';
$dis_nick = $list_config['nick_name']->display == 'Y';
$dis_user = $list_config['user_name']->display == 'Y';
$dis_update = $list_config['last_update']->display == 'Y';
$dis_updater = $list_config['last_updater']->display == 'Y';
$dis_update && $dis_updater ? $list_config['last_update']->display = 'N' : 0;
$list_config['content']->display = 'N';
$list_config['comment']->display = 'N';
$list_config['thumbnail']->display = 'N';
$list_config['custom_status']->display = 'Y';
$list_config['tag']->display = 'N';
$module_info->star_style!='N' ? $list_config['blamed_count']->display = 'N' : 0;
$module_info->star_style!='N' && $dis_voted ? $list_config['readed_count']->display = 'N' : 0;
$lang->short_readed_count ? $list_config['readed_count']->name = $lang->short_readed_count : 0;
$lang->short_blamed_count ? $list_config['blamed_count']->name = $lang->short_blamed_count : 0;
$lang->short_voted_count ? $list_config['voted_count']->name = $lang->short_voted_count : 0;
$module_info->star_style!='N' ? $list_config['voted_count']->name = $lang->star_column : 0;
$colcnt = $sotcnt = 0;
$show_columns = array();
$dis_foot = array('regdate');
$dis_update?$dis_foot[]='last_update':0;
$is_notice_widget = !$document_srl && $module_info->use_notice_widget=='widget';
$a_lsttp = array('notice'=>&$notice_list,'best'=>&$best_list);
}
<block loop="$list_config => $key,$val" cond="$val->display=='Y'">
{@
$colcnt += $val->idx<0?1:0;
$show_columns[$key] = $val;
}
</block>
<!-- LIST -->
<include cond="$is_notice_widget && (count($notice_list) || count($best_list))" target="_etc.noticewidget.html" />
<table id="siLst" class="webz{$module_info->display_list_header=='N'?' noheader':''}" width="100%" border="0" cellspacing="0" summary="List of document">
<thead cond="$module_info->display_list_header != 'N'" class="scOneCol">
<tr>
<th scope="row" colspan="{$colcnt}">
<span loop="$show_columns => $key,$val" cond="$val->sort == 'Y'" class="sort"> {@ $sotcnt++}
<a href="{$oEntry->getUrl('auction_action','','sort_index',$key,'order_type',($order_type!='asc'?'asc':'desc'))}">{$val->name}<em class="asc"|cond="$sort_index==$key&&$order_type=='asc'"> </em></a>
</span>
<span cond="$module_info->display_document_count!='N'&&!$sotcnt" class="scStatsArea">
<em>Today</em> <strong>{$oThis->getDocumentCountByDate(date("Ymd"))}</strong>,
<em>Yesterday</em> <strong>{$oThis->getDocumentCountByDate(date("Ymd",strtotime("-1 day", time())))}</strong>,
<em>Total</em> <strong>{$total_count}</strong>
</span>
</th>
<th cond="$grant->manager" class="scCheck sort"><input type="checkbox" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /></th>
</tr>
</thead>
{@ setcookie('scCaLock_'.$mid.$category_srl,$sotcnt?'':'btnhide',null,'/')}
<block cond="!$is_notice_widget">
<tbody loop="$a_lsttp => $lsttk,$p_list" cond="$lsttk && count($p_list)" class="{$lsttk}">
<block loop="$p_list => $no,$document">
{@
$is_blind = ($lsttk!='notice'&&$module_info->use_blind=='Y')?$oThis->isBlind($document->document_srl, $document->get('blamed_count')):0;
$purl = $oEntry->getUrl('','mid',$mid,'document_srl',$document->document_srl,'sort_index',$sort_index,'order_type',$order_type,'search_target',$search_target,'search_keyword',$search_keyword,'page',$spage);
}
<tr data-hottrack="{$purl}"|cond="$use_hottrack">
<td loop="$show_columns => $key,$val" cond="$val->idx<0" scope="col" class="{$key}" style="color:{$val->color}"|cond="$val->color">
<!--@switch($key)-->
<!--@case('no')-->
{@ $no = $lsttk?'<img src="img/common/label_'.$lsttk.'.gif" alt="'.$lsttk.'" />':$no}
{($document->document_srl==$document_srl)?'<b class="rArr">⇒</b>':$no}
<!--@break-->
<!--@case('category_srl')-->
{@ $cate = $is_cat?$category_list[$document->get('category_srl')]:0 }
<a cond="$cate" href="{$oEntry->getUrl('','mid',$mid,'category_srl',$cate->category_srl)}" title="{htmlspecialchars($cate->description)}" style="color:{$cate->color}"|cond="$cate->color">{$cate->title}</a>
<span cond="!$cate">{$lang->none_category}</span>
<!--@break-->
<!--@case('title')-->
<div class="scElps" data-active="true"|cond="$is_ellipsis">
<a class="fl" href="{$purl}">{$is_blind?$lang->msg_is_blind:$document->getTitle($module_info->title_length)}</a>
<span class="fr">
{@
$commentCnt = $document->getCommentCount();
$trackbackCnt = $document->getTrackbackCount();
}
<em cond="$commentCnt" class="reply" title="Replies">+{$commentCnt}</em><em cond="$trackbackCnt" class="trackback" title="Trackbacks">.{$trackbackCnt}</em>
{$document->printExtraImages(60*60*$module_info->duration_new)}<img class="scIcoSet world" src="img/common/blank.gif" alt="multilingual" title="multilingual" cond="$dis_multilingual&&count($uns_extra->beluxe->langs)" />
</span>
</div>
<!--@break-->
<!--@case('nick_name')-->
<!--@case('user_name')-->
{@
$mbsl = $document->get('member_srl');
$home = $document->get('homepage');
$nick = cut_str((!$mbsl||$key=='nick_name')?$document->getNickName():$document->getUserName(), $module_info->nickname_length);
}
<a cond="!$mbsl && $home" href="{$home}" target="_blank">{$nick}</a>
<strong cond="!$mbsl && !$home">{$nick}</strong>
<a cond="$mbsl" href="#popup_menu_area" class="member_{$mbsl}" onclick="return false">{$nick}</a>
<!--@break-->
<!--@case('custom_status')-->
<span class="custom_status_{(int)$document->get('is_notice')}"|cond="$lsttk!='notice'">{$lsttk&&$lsttk=='notice'?$lang->notice:$custom_status[(int)$document->get('is_notice')]}</span>
<!--@break-->
<!--@case('voted_count')-->
<!--@case('blamed_count')-->
<!--@if($module_info->star_style!='N')-->
{@
$votedp = (int)$document->get('voted_count');
$blamedp = (int)$document->get('blamed_count');
$totalp = $votedp?(($votedp / ($votedp + abs($blamedp)) * 100) * 0.5):0;
}
<span cond="$dis_readed" class="scRdStar color{$module_info->star_style}" title="{$lang->readed_count}">{$document->get('readed_count')}</span>
<span class="scVtStar color{$module_info->star_style}" title="{$lang->voted_count}: {$votedp.'/'.$blamedp}"><em style="width:{$totalp}px"></em></span>
<!--@else-->
{$document->get($key)}
<!--@endif-->
<!--@break-->
<!--@case('regdate')-->
<!--@case('last_update')-->
{($key=='regdate')?$document->getRegdate('Y-m-d'):zdate($document->get('last_update'))}
<!--@break-->
<!--@case('last_updater')-->
<!--@if($dis_update && $dis_updater)-->
<span cond="$document->get('last_updater')" title="{$lang->last_updater}">{zdate($document->get('last_update'),'y-m-d')} : <em>{$document->get('last_updater')}</em></span>
<!--@else-->
{$document->get($key)}
<!--@endif-->
<!--@break-->
<!--@default-->
{($list_config[$key]->idx > 0)?$document->getExtraValueHTML($list_config[$key]->idx):$document->get($key)}
<!--@endswitch-->
</td>
<td cond="$grant->manager" class="scCheck"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" checked="checked"|cond="$document->isCarted()" /></td>
</tr>
</block>
</tbody>
</block>
<tbody cond="count($document_list)">
<tr>
<td scope="col" colspan="{$colcnt+2}" class="scBox clearBar">
<!--// 표시안되는거 제거, 순서 변경, 임시컬럼추가 -->
{@
$dis_regdate = $show_columns['regdate'];
unset($show_columns['no']);
unset($show_columns['category_srl']);
unset($show_columns['nick_name']);
unset($show_columns['user_name']);
unset($show_columns['readed_count']);
unset($show_columns['voted_count']);
unset($show_columns['blamed_count']);
unset($show_columns['custom_status']);
unset($show_columns['thumbnail']);
unset($show_columns['content']);
unset($show_columns['regdate']);
unset($show_columns['last_update']);
unset($show_columns['last_updater']);
$cols = array('colGreen','colBlue','colPurple','colRed');
}
<!--@if($dis_category)-->
{@$show_columns = array_merge(array('title'=>null,'mbAifo'=>null,'category_srl'=>null,'pntIfo'=>null), $show_columns)}
<!--@else-->
{@$show_columns = array_merge(array('title'=>null,'mbAifo'=>null,'pntIfo'=>null), $show_columns)}
<!--@end-->
<block loop="$document_list => $no,$document">
{@
$is_grant = $grant->view && (!$document->isSecret() || $document->isGranted());
$is_blind = $module_info->use_blind=='Y'?$oThis->isBlind($document->document_srl, $document->get('blamed_count')):0;
$purl = $oEntry->getUrl('','mid',$mid,'document_srl',$document->document_srl,'sort_index',$sort_index,'order_type',$order_type,'search_target',$search_target,'search_keyword',$search_keyword,'page',$spage);
$uns_extra = $document->get('extra_vars');
$uns_extra = is_string($uns_extra)?unserialize($uns_extra):$uns_extra;
$start_point = (int)$uns_extra->beluxe->extra->start_point;
$end_point = (int)$uns_extra->beluxe->extra->end_point;
$start_point>$end_point ? $start_point = 0 : 0;
$end_time = ztime($document->get('regdate'))+($uns_extra->beluxe->extra->end_time*60*60);
$doc_status = $is_doc==$document->document_srl ? $auction_status : (int) $document->get('is_notice');
}
<div class="scItem clearBar" style="margin-right:{(int)$module_info->thumbnail_width+25}px;" <!--@if($use_hottrack)-->data-hottrack="{$purl}" data-type="webz"<!--@endif-->>
{($document->document_srl==$document_srl)?'<b class="rArr">⇒</b>':''}
<!--@if(!$is_doc && !$doc_status && (time() > $end_time))-->
{@
$out = $oThis->setCustomStatus($document->document_srl, ((int) $document->getCommentCount()>0?1:3));
$doc_status = $out->toBool();
$doc_status?$oThis->setCustomActions($document->document_srl, array('complete_time',time())):0;
$voted_list = $doc_status?$oThis->getDocumentVotedLogs($document->document_srl):array();
}
<!--@if($doc_status&&count($voted_list))-->
{@
reset($voted_list);
$cur_voted = current($voted_list);
$mbr_srl = $cur_voted->member_srl;
$is_voted = abs($cur_voted->point)*-1;
$mbr_srl?$oThis->setVotePoint($document->document_srl, $mbr_srl, $is_voted):0;
$mbr_srl?$oThis->sendMessageToMember($document->get('member_srl'),$mbr_srl,$lang->msg_auctioned_off,sprintf($lang->msg_auction_send_phone, $uns_extra->beluxe->extra->phone_number, $document->getPermanentUrl())):0;
}
<!--@endif-->
<!--@endif-->
<div class="scInfo">
<a href="{$purl}" class="thum" style="width:{(int)$module_info->thumbnail_width}px;height:{(int)$module_info->thumbnail_height}px;">
<!--@if($is_blind || !$is_grant)-->
<img src="img/common/thum_{$is_blind?'blind':'secret'}.png" alt="{$is_blind?'blind':'secret'}" title="{$is_blind?'blind':'secret'}" height="{$module_info->thumbnail_height}" width="{$module_info->thumbnail_width}" />
<!--@else-->
<!--@if($document->thumbnailExists($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type))-->
<img src="{$document->getThumbnail($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type)}" border="0" alt="" />
<!--@else-->
<img src="img/common/thum_no.png" alt="no image" title="no image" height="{$module_info->thumbnail_height}" width="{$module_info->thumbnail_width}" />
<!--@endif-->
<!--@endif-->
</a>
<ul class="scFrm clearBar" style="margin-left:{(int)$module_info->thumbnail_width+25}px;">
<li loop="$show_columns => $key,$val" cond="$key" class="{$key}" style="color:{$val->color}"|cond="$val->color">
<!--@switch($key)-->
<!--@case('title')-->
<div class="scElps" data-active="true"|cond="$is_ellipsis">
<a href="{$purl}" class="fl" style="margin-right:-{(int)$module_info->thumbnail_width+25}px;">{$is_blind?$lang->msg_is_blind:$document->getTitle($module_info->title_length)}</a>
<span class="fr">
{$document->printExtraImages(60*60*$module_info->duration_new)}<img class="scIcoSet world" src="img/common/blank.gif" alt="multilingual" title="multilingual" cond="$dis_multilingual&&count($uns_extra->beluxe->langs)" />
<block cond="$is_pangpang&&$uns_extra->ppang&&$uns_extra->ppang->d->p>0">
{@$pangpang_point = sprintf($lang->bonus_pang_pang, $uns_extra->ppang->d->p)}
<img class="scIcoSet coin" src="img/common/blank.gif" title="{$pangpang_point}" alt="{$pangpang_point}" />
</block>
</span>
</div>
<!--@break-->
<!--@case('mbAifo')-->
<span>
<block cond="$dis_nick||$dis_user">
{@
$mbsl = $document->get('member_srl');
$home = $document->get('homepage');
$nick = (!$mbsl||$dis_nick)?cut_str($document->getNickName(), $module_info->nickname_length):'';
$nick .= ($mbsl&&$dis_user)?($nick?' (':'').cut_str($document->getUserName(), $module_info->nickname_length).($nick?')':''):'';
}
<a cond="!$mbsl && $home" href="{$home}" target="_blank">{$nick}</a>
<strong cond="!$mbsl && !$home">{$nick}</strong>
<a cond="$mbsl" href="#popup_menu_area" class="member_{$mbsl}" onclick="return false">{$nick}</a>
</block>
</span>
<div class="fr">
<block cond="$dis_readed">
<!--@if($module_info->star_style!='N')-->
<span class="scRdStar color{$module_info->star_style}" title="{$lang->readed_count}">{$document->get('readed_count')}</span>
<!--@else-->
<span>{$lang->readed_count}: {$document->get('readed_count')}</span>
<!--@endif-->
</block>
<block cond="$dis_voted || $dis_blamed">
<!--@if($module_info->star_style!='N')-->
{@
$votedp = (int)$document->get('voted_count');
$blamedp = (int)$document->get('blamed_count');
$totalp = $votedp?(($votedp / ($votedp + abs($blamedp)) * 100) * 0.5):0;
}
<span class="scVtStar color{$module_info->star_style}" title="{$lang->voted_count}: {$votedp.'/'.$blamedp}"><em style="width:{$totalp}px"></em></span>
<!--@else-->
<span style="margin-left:5px">{$lang->voted_count}: {$document->get('voted_count').'/'.$document->get('blamed_count')}</span>
<!--@endif-->
</block>
</div>
<!--@break-->
<!--@case('category_srl')-->
<label>{$lang->category_srl}:</label> {@ $cate = $is_cat?$category_list[$document->get('category_srl')]:0 }
<a cond="$cate" href="{$oEntry->getUrl('','mid',$mid,'category_srl',$cate->category_srl)}" title="{htmlspecialchars($cate->description)}" style="color:{$cate->color}"|cond="$cate->color">{$cate->title}</a>
<span cond="!$cate">{$lang->none_category}</span>
<!--@break-->
<!--@case('pntIfo')-->
<div>
<label>{$lang->start_point}:</label> <span>{$start_point}</span>
<span class="fr"><label>{$lang->bidder}:</label> <span>{(int) $document->getCommentCount()}</span></span>
</div>
<div>
<label>{$lang->end_point}:</label> <span>{$end_point}</span>
</div>
<div>
{@ $remaining_time = $doc_status?-1:round(($end_time - time()) / 60)}
<span cond="$remaining_time>0">{sprintf($lang->remaining_time,$remaining_time)}</span>
<span cond="$remaining_time<1">{$lang->end_bid}</span>
<span class="fr {$cols[$doc_status]}">{$lang->auction_status[(int)$doc_status]}</span>
</div>
<!--@break-->
<!--@default-->
<label>{$val->name}:</label> <span>{($list_config[$key]->idx > 0)?$document->getExtraValueHTML($list_config[$key]->idx):$document->get($key)}</span>
<!--@endswitch-->
</li>
<li class="content" style="color:{$list_config['content']->color}"|cond="$list_config['content']->color">
{$is_blind?$lang->msg_is_blind:$document->getSummary($module_info->summary_length)}
</li>
</ul>
<div class="wzdate" style="margin-right:-{(int)$module_info->thumbnail_width+25}px;">
{@ $t_cnt = count($dis_foot)}
<block loop="$dis_foot=>$key,$val">
<label>{$val=='last_updater'?($document->get($val)?'by':''):($list_config[$val]->name.':')}</label>
<span>{$val=='last_updater'?$document->get($val):zdate($document->get($val), 'Y-m-d H:i:s')}</span>
<span cond="$val=='last_updater'">/</span>
</block>
<span cond="$grant->manager" class="scCheck"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" checked="checked"|cond="$document->isCarted()" /></span>
</div>
<strong cond="$dis_regdate || $dis_update" class="scRibbon"><span class="caption">{$dis_regdate ? $document->getRegdate('M.d') : zdate($document->get('last_update'),'M.d')}</span></strong>
</div>
</div>
</block>
</td>
</tr>
</tbody>
<tbody cond="!count($document_list)"><tr><td colspan="{$colcnt+2}">{$lang->no_documents}</td></tr></tbody>
</table>
<!-- /LIST -->
댓글 3
-
송동우
2013.05.03 01:13
-
Google
2013.05.03 18:47
송동우님 감사요.
시간계산이 좀 틀리게나와서
이렇게 고쳤는데 대강 날짜가 표시되네요. 맞는지 흠.
Remaining Time :
{@
$secs = abs($end_time - time());
$days = $secs % 864000;
$day = floor($days / 86400);
$hours = $secs % 86400;
$hour = floor($hours / 3600);
$mins = $secs % 3600;
$min = floor($mins / 60);
}
{$day?$day.' Day ':''}
{$hour?$hour.' Hour ':''}
{$min?$min.' Min ':''}
하루 걸림.
-
Google
2013.05.03 18:49
그리고 질문 올린 글은 못지우나요?
필요없는 내용인데..
{sprintf($lang->remaining_time,$remaining_time)}
이것을
Remaining Time:
{@
$secs = abs($end_time - time());
$hours = $secs % 86400;
$hour = floor($hours / 3600);
$mins = $hours % 3600;
$min = floor($mins / 60);
}
{$hour?$hour.' Hour(s) ':''}
{$min?$min.' Minute(s) ':''}
이것으로 수정