DISCUZ教程之如何让网站的x默认宽屏显示
对模板文件进行过修改的朋友可以这样修改,在template/default/common/header.htm <br />找到 <br /><!--{if !empty($_G['cookie']['widthauto']) && empty($_G['disabledwidthauto'])}--> <br /><link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" /> <br /><script type="text/javascript">HTMLNODE.className += ' widthauto'</script> <br /><!--{/if}--> <br />改为下面的代码,其实就是去掉了判断 <br /><link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" /> <br /><script type="text/javascript">HTMLNODE.className += ' widthauto'</script> <br />接下来找到 <br /><a href="javascript:;" onclick="widthauto(this)"><!--{if empty($_G['cookie']['widthauto'])}-->{lang switch_wide}<!--{else}-->{lang switch_narrow}<!--{/if}--></a> <br />替换为下面的代码 <br /><a href="javascript:;" onClick="widthauto(this)"><!--{if empty($_G['cookie']['widthauto'])}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a> <br />更新缓存
頁:
[1]