{php $user=dr_member_info($t.uid);}
{if $user.is_admin}
<span class="label label-success" style="font-size: 12px">官方</span> {$t.author}
{elseif $user.author}
<span class="label label-primary" style="font-size: 12px">發(fā)布者</span> {$t.author}
{else}
<span class="label label-warning" style="font-size: 12px">網(wǎng)友</span> {$t.author}
{/if}
這是前臺(tái)判斷評(píng)論時(shí)的語(yǔ)句,在評(píng)論列表里,請(qǐng)問(wèn)一下我要判斷如果是這篇文章的作者評(píng)論的話就顯示“發(fā)布者”,應(yīng)該怎么寫?
{if $index.uid==$t.uid}
開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
回復(fù)@外聘專員-明礬軟件
我的代碼如下:
{php $user = dr_member_info($t.uid);} {if $user.is_admin} <span class="label label-success" style="font-size: 12px">官方</span> {$t.author} {elseif $index.uid==$t.uid} <span class="label label-primary" style="font-size: 12px">發(fā)布者</span> {$t.author} {else} <span class="label label-warning" style="font-size: 12px">網(wǎng)友</span> {$t.author} {/if}{if $index.uid==$t.uid} <span class="label label-primary" style="font-size: 12px">發(fā)布者</span> {$t.author} {elseif $user.is_admin} <span class="label label-success" style="font-size: 12px">官方</span> {$t.author} {else} <span class="label label-warning" style="font-size: 12px">網(wǎng)友</span> {$t.author} {/if}開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
完美解決