优选主流主机商
任何主机均需规范使用

如何设置DISCUZ网站默认宽屏显示

对模板文件进行过修改的朋友可以这样修改,在template/default/common/header.htm
找到

  1. <!–{if !empty($_G[‘cookie’][‘widthauto’]) && empty($_G[‘disabledwidthauto’])}–>
  2. <link rel=”stylesheet” id=”css_widthauto” type=”text/css” href=”data/cache/style_{STYLEID}_widthauto.css?{VERHASH}” />
  3. <script type=”text/javascript”>HTMLNODE.className += ‘ widthauto'</script>
  4. <!–{/if}–>

改为下面的代码,其实就是去掉了判断

  1. <link rel=”stylesheet” id=”css_widthauto” type=”text/css” href=”data/cache/style_{STYLEID}_widthauto.css?{VERHASH}” />
  2. <script type=”text/javascript”>HTMLNODE.className += ‘ widthauto'</script>

接下来找到

  1. <a href=”javascript:;” onclick=”widthauto(this)”><!–{if empty($_G[‘cookie’][‘widthauto’])}–>{lang switch_wide}<!–{else}–>{lang switch_narrow}<!–{/if}–></a>

替换为下面的代码

  1. <a href=”javascript:;” onClick=”widthauto(this)”><!–{if empty($_G[‘cookie’][‘widthauto’])}–>{lang switch_narrow}<!–{else}–>{lang switch_wide}<!–{/if}–></a>

更新缓存

未经允许不得转载:搬瓦工中文网 » 如何设置DISCUZ网站默认宽屏显示