无限星辰工作室-客户无限互联网动力之源

标题: Discuz!x3.2 帖子列表隐藏发帖按键解决方案之一 [打印本页]

作者: crx349    时间: 2014-9-22 14:56
标题: Discuz!x3.2 帖子列表隐藏发帖按键解决方案之一
方案说明:某些情况下,需要将板块发帖权限去掉,这个可以在后台的板块权限设置里面进行配置,但是这样设置导读又不抓取内容,所以才有以下方案
适用版本:Discuz! x3 x3.1 x3.2
解决方案:
1.打开 \template\default\forum\forumdisplay.htm
搜索:
  1. <div id="pgt" class="bm bw0 pgs cl">
  2.                                         <span id="fd_page_top">$multipage</span>
  3.                                         <span class="pgb y" {if $_G[setting][visitedforums]}id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id,'pos':'34'})"{/if} ><a href="forum.php">{lang return_index}</a></span>
  4.                                         <!--{if !$_GET['archiveid']}--><a href="javascript:;" id="newspecial" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"{if !$_G['forum']['allowspecialonly'] && empty($_G['forum']['picstyle']) && !$_G['forum']['threadsorts']['required']} onclick="showWindow('newthread', 'forum.php?mod=post&action=newthread&fid=$_G[fid]')"{else} onclick="location.href='forum.php?mod=post&action=newthread&fid=$_G[fid]';return false;"{/if} title="{lang send_posts}"><img src="{IMGDIR}/pn_post.png" alt="{lang send_posts}" /></a><!--{/if}-->
  5.                                         <!--{hook/forumdisplay_postbutton_top}-->
  6.                                 </div>
复制代码

修改为:
  1. <!--{if $_G[fid] !=('44','45')}--> <!--隐藏发帖 -->
  2.                                 <div id="pgt" class="bm bw0 pgs cl">
  3.                                         <span id="fd_page_top">$multipage</span>
  4.                                         <span class="pgb y" {if $_G[setting][visitedforums]}id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id,'pos':'34'})"{/if} ><a href="forum.php">{lang return_index}</a></span>
  5.                                         <!--{if !$_GET['archiveid']}--><a href="javascript:;" id="newspecial" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"{if !$_G['forum']['allowspecialonly'] && empty($_G['forum']['picstyle']) && !$_G['forum']['threadsorts']['required']} onclick="showWindow('newthread', 'forum.php?mod=post&action=newthread&fid=$_G[fid]')"{else} onclick="location.href='forum.php?mod=post&action=newthread&fid=$_G[fid]';return false;"{/if} title="{lang send_posts}"><img src="{IMGDIR}/pn_post.png" alt="{lang send_posts}" /></a><!--{/if}-->
  6.                                         <!--{hook/forumdisplay_postbutton_top}-->
  7.                                 </div>
  8.                                 <!--{/if}--><!--隐藏发帖 -->
复制代码
2.保存修改,覆盖同名文件。(模板路径根据实际使用路径确定)

3.方案实施完毕。
备注说明:其中fid为板块id号








欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4