武玉杰 發表於 2012-5-25 16:38:04

DISCUZ教程之如何让网站的x默认宽屏显示

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