霸王别姬 发表于 2025-12-27 16:06:09

论坛首页的今日、昨日帖数、会员数,最新注册会员,这个如何屏蔽只能管理员可见? New

如题:论坛首页的今日、昨日帖数、会员数,最新注册会员,这个如何屏蔽只能管理员可见?或者直接删除不显示,请问在哪里修改,谢谢。我知道答案 回答被采纳将会获得1 贡献 已有11人回答

yusr 发表于 2025-12-27 16:07:00

是默认模板吗

yusr 发表于 2025-12-27 16:07:55

百度有教程的,我忘了当时我是怎么删的了

具体搜索一下:怎样删除论坛顶部的今日、昨日帖数显示的方法

知行社区 发表于 2025-12-27 16:08:12

搜索了,结果为0

yusr 发表于 2025-12-27 16:08:30

template/default/forum/discuz.htm

查找40行
{lang index_today}: <em>$todayposts</em><span class="pipe">|</span>{lang index_yesterday}: <em>$postdata</em><span class="pipe">|</span>


替换为
<!--{if in_array($_G, array(1, 2,3))}-->{lang index_today}: <em>$todayposts</em><span class="pipe">|</span>{lang index_yesterday}: <em>$postdata</em><span class="pipe">|</span><!--{/if}-->

霸王别姬 发表于 2025-12-27 16:09:01

代码中array(1, 2,3)是不受限的用户组 id,如果只有管理员可见,只填1即可。

::Bra 发表于 2025-12-27 16:09:40

还能这样,我去试试,谢谢

站帮网 发表于 2025-12-27 16:10:23

3.5的版本代码如下:
                        <p class="chart z">{if in_array($_G, array(1, 2,3))} {lang index_today}: <em>$todayposts</em><span class="pipe">|</span>{lang index_yesterday}: <em>$postdata</em><span class="pipe">|</span>{/if}{lang index_posts}: <em>$posts</em><span class="pipe">|</span>{lang index_members}: <em>$_G['cache']['userstats']['totalmembers']</em><!--{if $_G['cache']['userstats']['newsetuser']}--><span class="pipe">|</span>{lang welcome_new_members}: <em><a href="home.php?mod=space&username={echo rawurlencode($_G['cache']['userstats']['newsetuser'])}" target="_blank" class="xi2">$_G['cache']['userstats']['newsetuser']</a></em><!--{/if}--></p>

可可的可 发表于 2025-12-27 16:10:40

按你的方法修改后不起作用:
                        <p class="chart z">{if in_array($_G, array(1, 2,3))} {lang index_today}: <em>$todayposts</em><span class="pipe">|</span>{lang index_yesterday}: <em>$postdata</em><span class="pipe">|</span>{/if}{lang index_posts}: <em>$posts</em><span class="pipe">|</span>{lang index_members}: <em>$_G['cache']['userstats']['totalmembers']</em><!--{if $_G['cache']['userstats']['newsetuser']}--><span class="pipe">|</span>{lang welcome_new_members}: <em><a href="home.php?mod=space&username={echo rawurlencode($_G['cache']['userstats']['newsetuser'])}" target="_blank" class="xi2">$_G['cache']['userstats']['newsetuser']</a></em><!--{/if}--></p>

IT618应用中心 发表于 2025-12-27 16:11:31

可以了
页: [1]
查看完整版本: 论坛首页的今日、昨日帖数、会员数,最新注册会员,这个如何屏蔽只能管理员可见? New