方案说明:某些情况下,需要将板块发帖权限去掉,这个可以在后台的板块权限设置里面进行配置,但是这样设置导读又不抓取内容,所以才有以下方案
适用版本:Discuz! x3 x3.1 x3.2
解决方案:
1.打开 \template\default\forum\forumdisplay.htm
搜索:
- <div id="pgt" class="bm bw0 pgs cl">
- <span id="fd_page_top">$multipage</span>
- <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>
- <!--{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}-->
- <!--{hook/forumdisplay_postbutton_top}-->
- </div>
复制代码
修改为:
- <!--{if $_G[fid] !=('44','45')}--> <!--隐藏发帖 -->
- <div id="pgt" class="bm bw0 pgs cl">
- <span id="fd_page_top">$multipage</span>
- <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>
- <!--{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}-->
- <!--{hook/forumdisplay_postbutton_top}-->
- </div>
- <!--{/if}--><!--隐藏发帖 -->
复制代码 2.保存修改,覆盖同名文件。(模板路径根据实际使用路径确定)
3.方案实施完毕。
备注说明:其中fid为板块id号
|
|