DT6.0开发之-调用信息评论
今天在做destoon6.0产品内页开发时候,用到了调取当前信息评论,所以就顺便做下笔记。
调用当前信息的评论代码:
<!--{tag("table=destoot_comment&condition=status=3 and item_id=$itemid&pagesize=10&datetype=6&order=addtime desc&template=list_comment",-1)}-->
在tag下新建一个list_comment.htm,模板里添加以下代码
<link rel="stylesheet" type="text/css" href="{SKIN_PATH}comment.css" /> {loop $tags $i $t} <div class="comment comment_sp"> <div class="comment_title"> <span id="i_{$t[itemid]}">{if $t[username]}{$t[username]}{else}Guest{/if} 于 <span class="comment_time">{timetodate($t['addtime'], $datetype)}</span> 评论道:</span> </div> <div class="comment_content" id="c_{$t[itemid]}">{$t[content]}</div> </div> {/loop}
千行代码,Bug何处藏。 纵使上线又怎样,朝令改,夕断肠。