修改 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);