修改 template/default/common/header.htm 第 3 行
查找
- <!--{if $_G['basescript'] == 'forum'}-->
下面加入:
- {eval $widthauto = 1; // 变量为 1,强制第一次访问页面为宽屏。为 0 则不强制}
- <!--{if $_G['cookie']['widthauto'] != '2' && $widthauto == 1 }-->
- {eval dsetcookie('widthauto', 1);}
- {eval $_G['cookie']['widthauto'] = 1;}
- <!--{elseif $_G['cookie']['widthauto'] == '2'}-->
- {eval dsetcookie('widthauto', 2);}
- {eval $_G['cookie']['widthauto'] = 0;}
- <!--{/if}-->
=====================
然后找到 static/js/common.js 找到 3087 行:
查找:
- HTMLNODE.className = HTMLNODE.className.replace(' widthauto', '');
下面修改为
- setcookie('widthauto', 2, 86400 * 30);