评论调用 | |
<div class="yzm-comment-list-box"> {m:comment_list modelid="$modelid" catid="$catid" id="$id" limit="20"} <div class="yzm-comment-list-top">共 {count($data)} 条评论</div> <div class="yzm-comment-list-body"> <ul> {loop $data $v} <li> <a class="user_pic" href="{U('member/myhome/init', array('userid'=>$v['userid']))}" target="blank"><img src="{if !empty($v['userpic'])}{$v[userpic]}{else}{STATIC_URL}images/default.gif{/if}" height="35" width="35"></a> <div class="yzm-comm-right"> <a class="user_name" href="{U('member/myhome/init', array('userid'=>$v['userid']))}" target="blank">{$v[username]}</a> <p>{nl2br($v['content'])}</p> <p><span class="comm_time">{date('Y-m-d H:i:s',$v['inputtime'])}</span> <a href="javascript:toreply('{$v[id]}');" class="comm_a">回复</a></p> <div id="rep_{$v[id]}" class="none"> <form action="{U('comment/index/init')}" method="post" onsubmit="return check_rep(this)"> <input type="hidden" name="modelid" value="{$modelid}"> <input type="hidden" name="catid" value="{$catid}"> <input type="hidden" name="id" value="{$id}"> <input type="hidden" name="title" value="{$title}"> <input type="hidden" name="url" value="{$url}"> <input type="hidden" name="reply" value="{$v[id]}"> <input type="hidden" name="reply_to" value="{$v[username]}"> <textarea name="content" class="textarea textarea2" placeholder="我来说两句~"></textarea> <input type="submit" class="yzm-comment-submit static" name="dosubmit" value="提交"> </form> </div> </div> </li> {/loop} {if empty($data)}<li>这篇文章还没有收到评论,赶紧来抢沙发吧~</li>{/if} </ul> </div> </div> |
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 iCMS, Fastadmin, ClassCMS, LeCMS, PbootCMS, PHPCMS, 易优CMS, YzmCMS, 讯睿CMS, 极致CMS, Wordpress, HkCMS, YznCMS, WellCMS, ThinkCMF, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。