很多站长都想去掉论坛默认界面最顶部的灰色导航栏,如图所示:
很简单,修改方法如下:
编辑 template/default/common/header.htm
删除 57-81 行代码:
编辑 template/default/common/header.htm
删除 57-81 行代码:
- <div id="toptb" >
- <!--{hook/global_cpnav_top}-->
- <div >
- <div >
- <!--{loop $_G['setting']['topnavs'][0] $nav}-->
- <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['lev
- el'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->
- <!--{/loop}-->
- <!--{hook/global_cpnav_extra1}-->
- </div>
- <div >
- <a id="switchblind" href="javascript:;" onclick="toggleBlind(this)" title="{lang switch_blind}" >{lang switch_blind}</a>
- <!--{hook/global_cpnav_extra2}-->
-  
; <!--{loop $_G['setting']['topnavs'][1] $nav}--> - <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['lev
- el'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->
- <!--{/loop}-->
- <!--{if empty($_G['disabledwidthauto']) && $_G['setting']['switchwidthauto']}-->
- <a href="javascript:;" id="switchwidth" onclick="widthauto(this)" title="{if widthauto()}{lang switch_narrow}{else}{lang switch_wide}{/if}" cl
- ass="switchwidth"><!--{if widthauto()}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a>
- <!--{/if}-->
- <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}--><a id="sslct" href="javascript:;" onmouseover="delayShow(this, function() {showMenu({'ctrlid
- ':'sslct','pos':'34!'})});">{lang changestyle}</a><!--{/if}-->
- <!--{if check_diy_perm($topic)}-->
- $diynav
- <!--{/if}-->
- </div>
- </div>
- </div>
如果最顶部的 10px 空隙也需要去掉的话,修改 template/default/common/common.css 第 587 行:
- #hd .wp { padding: 10px 0 0; }
修改为:
- #hd .wp { padding: 0px}
然后去后台点击界面,风格管理,更新 CSS 缓存即可。
以上修改会导致无法 diy,可以加在如图位置:
修改方法:template/default/common/header_userstatus.htm 搜索
- <span >|</span><a href="home.php?mod=spacecp&ac=usergroup" id="g_upmine" onmouseover="d
- elayShow(this, showUpgradeinfo)">{lang usergroup}: $_G[group][grouptitle]<!--{if $_G[member]['freeze']}--><span >({lang f
- reeze})</span><!--{/if}--></a>
- </p>
修改为:
- <span >|</span><a href="home.php?mod=spacecp&ac=usergroup" id="g_upmine" onmouseover="d
- elayShow(this, showUpgradeinfo)">{lang usergroup}: $_G[group][grouptitle]<!--{if $_G[member]['freeze']}--><span >({lang f
- reeze})</span><!--{/if}--></a>
- $diynav
- </p>