DISCUZ教程之如何让网站的x默认宽屏显示
DISCUZ教程之如何让网站的x默认宽屏显示详细介绍
现在很多液晶显示器都是宽屏显示了.如果再把网站做的很窄.会不好看的.如何让默认的显示成宽屏的呢?下面我们来介绍一下
对模板文件进行过修改的朋友可以这样修改,在template/default/common/header.htm
找到
<!--{if !empty($_G['cookie']['widthauto']) && empty($_G['disableidthauto'])}-->
<link rel="stylesheet" id="_widthauto"
; type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />
<script type="text/script">NODE.className += ' widthauto'</script>
<!--{/if}-->
改为下面的代码,其实就是去掉了判断
<link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />
&l
t;script type="text/">HTMLNODE.className += ' widthauto'</script>
接下来找到
<a href="javascript:;" onclick="widthauto(this)"><!--{if empty($_G['cookie']['widthauto'])}-->{lang switch_wide}<!--{else}-->{lang switch_narrow}<!--{/if}--></a>
替换为下面的代码
<a href="javascript: KQhRK;" onClick="widthauto(this)"><!--
http://{if empty($_G['cookie']['widthauto'])}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a>
更新缓存 本文标题: DISCUZ教程之如何让网站的x默认宽屏显示 ,