//==============禁言检查函数Begin===============
function postban_check($fid, $theuser){
global $isadmin, $issupermod, $db, $postban;
if (!$fid || !$theuser) return 1;
if ($isadmin || $issupermod) return 1;
else {
$timestamp = time();
$fid=intval($fid);
if ($fid < 1) return 0;
$post_bancount=$db->result($db->query("select count(*) FROM cdb_postban where (fid='$fid' or fid='65535') AND username='$theuser' AND timelimit > $timestamp"), 0);
if ($post_bancount) return 0;
else return 1;
}
}
//=====================END========================
复制代码
注意:如果你的论坛不是cdb_默认前缀的。请把上面的
$post_bancount=$db->result($db->query("select count(*) FROM cdb_postban where (fid='$fid' or fid='65535') AND username='$theuser' AND timelimit > $timestamp"), 0);
//===========板块禁言检查begin========
if (!$ismoderator) {
if (!postban_check($forum[fid], $discuz_user)) showmessage('你在本板块被禁言,不能发贴和编辑');
}
//===========板块禁言检查end==========
复制代码
5 include/newreply.inc.php
查找:
if($subject == '' && $message == '') {
复制代码
在上面插入:
//===========板块禁言检查begin========
if (!$ismoderator) {
if (!postban_check($forum[fid], $discuz_user)) showmessage('你在本板块被禁言,不能发贴和编辑');
}
//===========板块禁言检查end==========
复制代码
6 include/editpost.inc.php
查找:
if(empty($delete)) {
复制代码
在上面插入:
//===========板块禁言检查begin========
if (!$ismoderator) {
if (!postban_check($forum[fid], $discuz_user)) showmessage('你在本板块被禁言,不能发贴和编辑');
}
//===========板块禁言检查end==========
复制代码
7 在后台的插件添加里面,导入附件里面那个upload外的txt文件!!!最好用写字板打开:)
8 更新缓存+后台设置
解压密码:
CooL__er,如果您要查看本帖隐藏内容请回复
Image attachment:
犯人监狱首页.jpg (2023-2-20 13:21, 168.29 K) / Number of times this attachment has been downloaded 2 http://cloud.caffz.com:12345/mud/AbyssalSwamp/index/attachment.php?aid=1054
Image attachment:
逃狱失败.JPG (2023-2-20 13:21, 102.13 K) / Number of times this attachment has been downloaded 0 http://cloud.caffz.com:12345/mud/AbyssalSwamp/index/attachment.php?aid=1055