九五二七宅在家
發文於
無分類

Xoops Protector 防護模組的使用說明

作者

在Xoops 2.3之後,Protector 防護模組已經一起打包了!

而在2.4之後更是內建在裡面了!

而現在要分享的是2.3系列打包的版本的使用方法

(其他版本可能會有些不同)

 

--summary--

 

首先安裝Xoops前,

先將檔案mainfile.dist.php.protector改名為mainfile.dist.php

並複製到網站的root目錄底下,覆蓋掉舊檔(或編輯內容整個換掉亦可)

 

安裝沒問題後,

再用文字編輯器修改mainfile.php的檔案內容

並在最底下找到

define( 'XOOPS_GROUP_ADMIN', '1' );
define( 'XOOPS_GROUP_USERS', '2' );
define( 'XOOPS_GROUP_ANONYMOUS', '3' );

if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
     include XOOPS_ROOT_PATH."/include/common.php";
}
}
?>

接下來插入兩行Protector的程式

define( 'XOOPS_GROUP_ADMIN', '1' );
define( 'XOOPS_GROUP_USERS', '2' );
define( 'XOOPS_GROUP_ANONYMOUS', '3' );

include XOOPS_TRUST_PATH . '/modules/protector/include/precheck.inc.php';
if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
     include XOOPS_ROOT_PATH."/include/common.php";
}

include XOOPS_TRUST_PATH . '/modules/protector/include/postcheck.inc.php';
}
?>

請注意兩行是不一樣的檔名唷~

接著存檔,將mainfile.php改為唯讀,

你Xoops的Protector 防護模組即可正式使用了!