Sorrel 發表於 2024-11-10 23:16:47

请问如何在帖子内容页判断是楼主?

<br /><br />通常都是<ol><li>&lt;!--{if $post['first']}--&gt;</ol>来判断楼主,但是我对模板整体改版了一下。<br /><br />我的内容页翻页后,第一个不显示楼主,只显示回帖,这样就不能判断楼主了。<br /><br />请问还有什么if判断楼主的办法呢?<br />楼主<em>, </em>判断<em>, </em>内容<em>, </em>显示<em>, </em>请问

天外飘仙 發表於 2024-11-11 08:08:54

第二页的 最上边的帖子 的作者 也不能称之为&nbsp;&nbsp;楼主呀;<br /><br />如果你想判断 是不是显示在 最最上边的帖子, 可以 用 eval标签 引入一个变量, 每次 循环输出 变量值+1, 这样你就可以根据变量值 来判断显示的位置了

Sorrel 發表於 2024-11-12 10:17:46

<br /><br />还是不太明白,我想调用显示{eval viewthread_profile_node('left', $post);}个人信息显示,但只是显示楼主,不显示楼层。<br /><br />翻页后看不到楼主帖子,所以我用的&lt;!--{if $post['first']}--&gt;就会不显示,不知道具体如何锁定楼主。<br /><br /><br /><ol><li>&lt;!--{if !($_G['setting']['threadguestlite'] &amp;&amp; !$_G['uid'])}--&gt;<br /><li>&nbsp; &nbsp; &lt;!--{eval $postcount = 0;}--&gt;<br /><li>&nbsp; &nbsp; &lt;!--{loop $postlist $post}--&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;!--{eval $postcount++;}--&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;!--{if $post['authorid'] == $_G['thread']['authorid']}--&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;!--{hook/viewthread_sidetop $postcount}--&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;{eval viewthread_profile_node('left', $post);}<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;!--{/if}--&gt;<br /><li>&nbsp; &nbsp; &lt;!--{/loop}--&gt;<br /><li>&lt;!--{/if}--&gt;&nbsp; &nbsp; &nbsp; &nbsp; </ol><br /><br />

天外飘仙 發表於 2024-11-12 10:59:30

<br />完全不知道你在说什么…… 要靠猜, 没法再往下讲了
頁: [1]
查看完整版本: 请问如何在帖子内容页判断是楼主?