묻고답하기
모바일 댓글 역순으로 출력하기 알려주세요.
2012.06.03 22:47
모바일에서 댓글을 역순으로 출력하려면 어떻게 해야하나요?
모바일 yorim 게시판을 이용하고 있습니다.
read.html 에서 수정하면 될 것 같은데요.....
{@ Context::addJsFile("./common/js/jquery.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/js_app.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/common.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/xml_handler.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/xml_js_filter.js", true, '', -100000) }
<!--%import("js/mboard.js")-->
<!--%import("css/mboard.css")-->
<div class="hx h2">
<h2>{$oDocument->getTitle()}<span class="bt"><a href="{getUrl('document_srl','','category','','page','')}"> {$module_info->browser_title}</a><use_category">!--@if($module_info->use_category == "Y" && $oDocument->get('category_srl'))--><a href="{getUrl('document_srl','','category',$oDocument->get('category_srl'))}"> › {$category_list[$oDocument->get('category_srl')]->title}</a><!--@end--></span></h2>
<span class="ex">{$oDocument->getNickName()}<span class="ext">{$oDocument->getRegdate("Y-m-d H:i")}</span><a href="#skip_co" class="ext">본문 건너뛰기</a></span><a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="write">Write</a>
</div>
<div class="co">
<isSecret">!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
<form action="./" method="get" class="ff" onsubmit="return procFilter(this, input_password)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<label for="cpw">{$lang->msg_is_secret}</label>
<input type="password" name="password" id="cpw" />
<input type="submit" value="{$lang->cmd_input}" class="bn dark" />
</form>
<!--@else-->
<isExtraVarsExists">!--@if($oDocument->isExtraVarsExists())-->
{@ $_extra_vars = $oDocument->getExtraVars(); }
<dl class="xv">
<!--@foreach($_extra_vars as $key => $val)-->
<dt>{$val->name}</dt>
<dd>{$val->getValueHTML()}</dd>
<!--@end-->
</dl>
<!--@end-->
{$oDocument->getContent(false)}
<!--@end-->
</div>
<div id="skip_co"></div>
<hasUploadedFiles">!--@if($oDocument->hasUploadedFiles())-->
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<div class="hx h3">
<h3>{$lang->uploaded_file} <em>({count($uploaded_list)})</em></h3>
<button type="button" class="tg" title="open/close"></button>
</div>
<ul class="file tgo open">
<!--@foreach($uploaded_list as $key => $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} <span class="size">{FileHandler::filesize($file->file_size)}</span></a></li>
<!--@end-->
</ul>
<!--@endif-->
<allowTrackback">!--@if($oDocument->allowTrackback() && $oDocument->getTrackbackCount())-->
<div class="hx h3">
<h3>{$lang->trackback} <em>[{$oDocument->getTrackbackCount()}]</em></h3>
<button type="button" class="tg" title="open/close"></button>
</div>
<ul class="rp tgo open">
{@ $_trackback_list = $oDocument->getTrackbacks() }
<!--@foreach($_trackback_list as $key => $val)-->
<li>
<p>{$val->excerpt}</p>
<span class="auth">
<em>{htmlspecialchars($val->title)} - {htmlspecialchars($val->blog_name)}</em>
<span class="time">{zdate($val->regdate, "Y.m.d")}</span>
<manager">!--@if($grant->manager)-->
<a href="07_password.html" class="btn de">삭제</a>
<!--@endif-->
</span>
</li>
<!--@end-->
</ul>
<!--@endif-->
<allowComment">!--@if($oDocument->allowComment() && $oDocument->getCommentCount())-->
<div class="hx h3">
<h3 id="clb">{$lang->comment} <em>({$oDocument->getCommentCount()})</em></h3>
<button type="button" class="tg tgr" title="open/close"></button>
</div>
<!--@endif-->
<write_comment">!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
<div class="hx h3">
<h3 class="wc">{$lang->write_comment}</h3>
<button type="button" class="tg" title="open/close"></button>
</div>
<form action="./" method="post" class="ff tgo open" onsubmit="return procFilter(this, insert_comment);">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="comment_srl" value="" />
<ul>
<li>
<label for="rText">{$lang->comment}</label>
<textarea name="content" cols="20" rows="5" id="rText"></textarea>
</li>
<!--@if(!$is_logged)-->
<li>
<label for="uName">{$lang->writer}</label>
<input name="nick_name" type="text" id="uName" />
</li>
<li>
<label for="uMail">{$lang->email_address}</label>
<input name="email_address" type="text" id="uMail" />
</li>
<li>
<label for="uPw">{$lang->password}</label>
<input name="password" type="password" id="uPw" />
</li>
<li>
<label for="uSite">{$lang->homepage}</label>
<input name="homepage" type="text" id="uSite" value="http://" />
</li>
<!--@endif-->
</ul>
<div class="bna">
<input name="" type="submit" value="{$lang->cmd_comment_registration}" class="bn white" />
</div>
</form>
<!--@end-->
<div style="height:1px;overflow:hidden;background:#ddd"></div>
<div class="bna">
<span class="fl"><a href="{getUrl('document_srl','')}" class="bn white">{$lang->cmd_list}</a></span>
<span class="fr">
<isEditable">!--@if($oDocument->isEditable())-->
<a href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}" class="bn white">{$lang->cmd_delete}</a>
<!--@end-->
</span>
</ul>
<script type="text/javascript">
//<![CDATA[
jQuery(function($){
$('.co .mm').next().hide();
$('.mm').click(function(){ $(this).hide().next().show();});
$('.tgo').removeClass('open');
$('.tg').click(function(){
$(this).parent('.h3').next('.tgo').toggleClass('open');
});
var loaded = false;
$('.tgr').click(function(){
if(!loaded) {
loaded = true;
{@ $lastpage = 1; }
{@ $temp = $oDocument->getComments() }
<comment_page_navigation">!--@if($oDocument->comment_page_navigation)-->
{@ $lastpage = $oDocument->comment_page_navigation->last_page }
<!--@endif-->
loadPage({$oDocument->document_srl}, {$lastpage});
}
});
});
//]]>
</script>
댓글 1
-
러키군
2012.06.03 23:09
모바일에서만 댓글을 역순정렬 시키고 싶단 말씀이시죠?XE폴더/modules/board/m.skins/사용하시는 스킨폴더/ 에 가셔서 comment.html 파일을 여시면요.{@ $_comment_list = $oDocument->getComments() }이부분이 보이실껀데 이줄 밑에 아래 코드를 넣으시면 됩니다. ^^;{@ if(is_array($_comment_list)) arsort($_comment_list); }