DedeCMS文章评论实现楼层的最简单方法,现在分享给大家,只改模板适用任何版本,修改文件为:templets\plus\feedback_templet.htm。注:红色部分为添加部分 div class=dede_comment ?php $i=1; ? {dede: […]
DedeCMS文章评论实现楼层的最简单方法,现在分享给大家,只改模板适用任何版本,修改文件为:templets\plus\feedback_templet.htm。注:红色部分为添加部分
<div class="dede_comment">
<?php
$i=1;
?>
{dede:datalist}
<?php
if($fields['userid']!='') $spaceurl = $cfg_basehost.'/member/index.php?uid='.$fields['userid'];
else $spaceurl = "#";
if($fields['username']=='匿名') $spaceurl = "#";
$fields['bgimg'] = 'cmt-neu.gif';
$fields['ftypetitle'] = '该用户表示中立';
if($fields['ftype']=='bad') {
$fields['bgimg'] = 'cmt-bad.gif';
$fields['ftypetitle'] = '该用户表示差评';
}
else if($fields['ftype']=='good') {
$fields['bgimg'] = 'cmt-good.gif';
$fields['ftypetitle'] = '该用户表示好评';
}
?>
<div class="decmt-box">
<div class="decmt-title">
<span class="moodico"><span>#<?php echo $i?>楼</span> <img src="{dede:global.cfg_templeturl/}/images/mood/<?php if($fields['face']>0) echo "ico-mood-{$fields['face']}.gif"; ?>" /> </span>
<span class="username"> {dede:field.username/}</span>
<span class="date"> 于 {dede:field.dtime function="MyDate('m-d H:i',@me)" /}</span>说到</div><!-- /decmt-title -->
<div class="decmt-act">
<span id='goodfb{dede:field.id/}'><a href="#" onclick="postBadGood('goodfb',{dede:field.id/})">支持</a>[{dede:field.good/}]</span>
<span id='badfb{dede:field.id/}'><a href="#" onclick="postBadGood('badfb',{dede:field.id/})">反对</a>[{dede:field.bad/}]</span>
<span><a href="feedback.php?fid={dede:field.id/}&action=quote">引用</a></span>
</div><!-- /decmt-act -->
<div class="decmt-content">
{dede:field.msg function="Quote_replace(@me)"/}
<img src="{dede:global.cfg_templeturl/}/images/{dede:field.bgimg/}" />
</div><!-- /decmt-content -->
</div><!-- /decmt-box -->
<?php
$i=$i+1;
?>
{/dede:datalist} {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} </div><!-- /dede_comment -->
</dd>
</dl>
</div>