标题:
[Discuz!]
如何去掉论坛顶部的“设为首页”灰色那栏
[打印本页]
作者:
admin
时间:
2014-12-9 17:20
标题:
如何去掉论坛顶部的“设为首页”灰色那栏
很多站长都想去掉论坛默认界面最顶部的灰色导航栏,如图所示:
2014-12-9 17:11
很简单,修改方法如下:
编辑template/default/common/header.htm
删除57-81行代码:
<div id="toptb" class="cl">
<!--{hook/global_cpnav_top}-->
<div class="wp">
<div class="z">
<!--{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 class="y">
<a id="switchblind" href="javascript:;" onclick="toggleBlind(this)" title="{lang switch_blind}" class="switchblind">{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,可以加在如图位置:
2014-12-10 16:00
修改方法:template/default/common/header_userstatus.htm 搜索
<span class="pipe">|</span><a href="home.php?mod=spacecp&ac=usergroup" id="g_upmine" class="showmenu" onmouseover="d
elayShow(this, showUpgradeinfo)">{lang usergroup}: $_G[group][grouptitle]<!--{if $_G[member]['freeze']}--><span class="xi1">({lang f
reeze})</span><!--{/if}--></a>
</p>
复制代码
修改为:
<span class="pipe">|</span><a href="home.php?mod=spacecp&ac=usergroup" id="g_upmine" class="showmenu" onmouseover="d
elayShow(this, showUpgradeinfo)">{lang usergroup}: $_G[group][grouptitle]<!--{if $_G[member]['freeze']}--><span class="xi1">({lang f
reeze})</span><!--{/if}--></a>
$diynav
</p>
复制代码
图片附件:
图1.jpg
(2014-12-9 17:11, 33.56 KB) / 下载次数 3400
http://www.verydz.com/help/attachment.php?aid=1094&k=0213be96a23ed23e0e54dd4a15e17a4b&t=1733743278&sid=GbL8jW
图片附件:
图2.jpg
(2014-12-10 16:00, 9.89 KB) / 下载次数 3238
http://www.verydz.com/help/attachment.php?aid=1100&k=5acedae5c9006a38f859adcb861c5689&t=1733743278&sid=GbL8jW
欢迎光临 帮助中心_DZ动力 (http://www.verydz.com/help/)
Powered by Discuz! 7.2