<?php
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class plugin_display_moderate
{
function post_newthread_check()
{
global $_G;
if ($_G['setting']['allowmoderatingthread'] && $_G['uid']) {
if ($_GET['action'] == 'newthread' || $_POST['action'] == 'newthread' || $_GET['action'] != 'reply') {
$tableid = 0; // 假设只在主表中检查
$threadmodcount = C::t('forum_thread')->count_by_fid_displayorder_authorid($_G['fid'], -2, $_G['uid'], $tableid);
if ($threadmodcount > 0) {
showmessage('抱歉,您有未审核的帖子,暂时无法发帖', 'forum.php?mod=forumdisplay&fid=' . $_G['fid'], array(), array('login' => 1));
}
}
}
}
}
class plugin_display_moderate_forum extends plugin_display_moderate {
public function post_newthread() {
$this->post_newthread_check();
}
}
|