让发帖数超过5的用户才能上传附件的修改方法

作者在 2008-06-24 00:33:05 发布以下内容
很多发广告的一上来就发很多附件,白白浪费服务器空间,修改一下post.php文件即可设置必须发帖数超过一定的数量才能上传文件。
 
找到119行左右的
$allowpostattach = $forum['allowpostattach'] != -1 && ($forum['allowpostattach'] == 1 || (!$forum['postattachperm'] && $allowpostattach) || ($forum['postattachperm'] && forumperm($forum['postattachperm'])));
 
修改为
$allowpostattach = $forum['allowpostattach'] != -1 && ($forum['allowpostattach'] == 1 || (!$forum['postattachperm'] && $allowpostattach) || ($forum['postattachperm'] && forumperm($forum['postattachperm']))) && $posts > 5;
 
后面蓝色的是添加部分,$posts是用户的发帖量,这样就可以让发帖量低于5的用户无法上传附件
论坛维护 | 阅读 5640 次
文章评论,共1条
变幻小子
2011-03-22 22:18
1
你好  路过看看
游客请输入验证码
浏览2781119次
文章归档