筍子工作雜記

一月 2, 2008

如何讓後台的跳轉頁面也套用前台的風格

Filed under: Uncategorized,xoops — shinnlu @ 1:59 下午

tested with xoops 2.016
所有呼叫 redirect_header都是執行這一個函式
/include/functions.php
line 364 function redirect_header($url, $time = 3, $message = “, $addredirect = true)

而在 372 行有一個判斷目前是前台,還是後台
if (defined(‘XOOPS_CPFUNC_LOADED’)) {
$theme = ‘default’;
} else {
$theme = $xoopsConfig['theme_set'];
}
只要讀到 XOOPS_CPFUNC_LOADED,就判定為後台,直接使用預設樣版
//include/cp_functions.php
line 27 //define(‘XOOPS_CPFUNC_LOADED’, 1);

把這一行 mark起來就可以了,目前使用起來沒什麼問題

無迴響 »

仍無迴響。

此篇文章迴響的訂閱源料 TrackBack URL

發表迴響

Powered by WordPress