DISCUZ教程之如何讓網(wǎng)站的x默認(rèn)寬屏顯示

字號(hào):


    對(duì)模板文件進(jìn)行過(guò)修改的朋友可以這樣修改,在template/default/common/header.htm
    找到
    <!--{if !empty($_G['cookie']['widthauto']) && empty($_G['disabledwidthauto'])}-->
    <link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />
    <script type="text/javascript">HTMLNODE.className += ' widthauto'</script>
    <!--{/if}-->
    改為下面的代碼,其實(shí)就是去掉了判斷
    <link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />
    <script type="text/javascript">HTMLNODE.className += ' widthauto'</script>
    接下來(lái)找到
    <a href="javascript:;" onclick="widthauto(this)"><!--{if empty($_G['cookie']['widthauto'])}-->{lang switch_wide}<!--{else}-->{lang switch_narrow}<!--{/if}--></a>
    替換為下面的代碼
    <a href="javascript:;" onClick="widthauto(this)"><!--{if empty($_G['cookie']['widthauto'])}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a>
    更新緩存