您的位置:首页 > 其它

Discuz!教程之如何隐藏版块主题列表中的最后回复时间或最后回复人

2017-08-17 10:22 741 查看


如果所示,在discuz!版块主题列表会显示最后回复人和回复时间,但是由于这个数据是单独存储的而不是直接调用最后回复楼层的信息,因此经常出现于楼层信息无法对应的情况,也有些站长由于其他原因想隐藏此处内容,本文介绍一下如果通过修改模板的方法来隐藏版块主题列表中的最后回复时间或最后回复人:

1.打开文件:

 \template\default\forum\forumdisplay_list.htm(此处以默认模板为例,如果使用第三方模板请将default\缓存对应的模板目录查看和修改,如果第三方模板中没有对应文件,请修改默认模板)

2.搜索$thread[lastposter]找到如下代码:
<td class="by">
<cite><!--{if $thread['lastposter']}--><a href="{if $thread[digest] != -2}home.php?mod=space&username=$thread[lastposterenc]{else}forum.php?mod=viewthread&tid=$thread[tid]&page={echo max(1, $thread[pages]);}{/if}" c="1">$thread[lastposter]</a><!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
<em><a href="{if $thread[digest] != -2 && !$thread[ordertype]}forum.php?mod=redirect&tid=$thread[tid]&goto=lastpost$highlight#lastpost{else}forum.php?mod=viewthread&tid=$thread[tid]{if !$thread[ordertype]}&page={echo max(1, $thread[pages]);}{/if}{/if}">$thread[lastpost]</a></em>
</td>
3.看到此处稍微会一点html知识的人已经就能修改了,其中$thread[lastposter]是最后回复人,$thread[lastpost]是最后回复时间!
4.修改完成之后上传文件,后台更新缓存。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐