Tên MOD: Kiểm duyệt diễn đàn
Cài đặt: unzip tất cả vào root của diễn đàn. Thực hiện chạy domain/users/kiemduyetinstall.php
Mở pages/mainmenu.php
Tìm Code sau:
$req = mysqlquery("SELECT FROM forum WHERE type = 't' and kedit='0' AND close!='1' ORDER BY time DESC LIMIT 10");
while ($arr = mysqlfetcharray($req)) {
$q3 = mysqlquery("select id, refid, text from forum where type='r' and id='" . $arr['refid'"> . "'");
$razd = mysqlfetcharray($q3);
$q4 = mysqlquery("select id, refid, text from forum where type='f' and id='" . $razd['refid'"> . "'");
$frm = mysqlfetcharray($q4);
?>
Chú thích: nếu không tìm thấy thì tìm đoạn tương tự nha.
Thay thế bằng:
$req = mysql_query("SELECT FROM forum WHERE type = 't' and kedit='0' AND kiemduyet = '1' AND close!='1' ORDER BY time DESC LIMIT 10");
while ($arr = mysqlfetcharray($req)) {
$q3 = mysqlquery("select id, refid, text from forum where type='r' and id='" . $arr['refid'"> . "'");
$razd = mysqlfetcharray($q3);
$q4 = mysqlquery("select id, refid, text from forum where type='f' and id='" . $razd['refid'"> . "'");
$frm = mysqlfetcharray($q4);
?>
Mở Forum/index.php
Find:
'tema',
'loadtem',
?>
ADD đoạn sau vào:
'kiemduyet',
'deltema',
?>
Tìm:
echo '<div class="gmenu"><form action="action"><div><input /></div></form>';
}
if ($total) {
$req = mysqlquery("SELECT * FROM forum WHERE type='t'" . ($rights >= 7 ? '' : " AND close!='1'") . " AND refid='$id' ORDER BY vip DESC, time DESC LIMIT $start, $kmess");
?>
Thay bằng:
echo '<div class="gmenu"><form action="action"><div><input /></div></form>';
}
if ($total) {
$req = mysqlquery("SELECT FROM forum WHERE kiemduyet = '1' AND type='t'" . ($rights >= 7 ? '' : " AND close!='1'") . " AND refid='$id' ORDER BY vip DESC, time DESC LIMIT $start, $kmess");
?>
Tìm:
echo isset($topicvote) && $topicvote > 0 ? '<a>' . $lngforum['editvote'"> . '</a>
<a>' . $lngforum['deletevote'"> . '</a>
'
: '<a>' . $lngforum['addvote'"> . '</a>
';
echo '<a>' . $lngforum['topicrename'"> . '</a>
';
?>
Thay bằng:
if(!$type1['kiemduyet'">) {
echo "<a href='index.php?act=kiemduyet&id=" . $id . "&kiemduyet'>Kiểm duyệt | <a>Loại bỏ</a>
";
}
echo isset($topicvote) && $topicvote > 0 ? '<a>' . $lngforum['editvote'"> . '</a>
<a>' . $lngforum['deletevote'"> . '</a>
'
: '<a>' . $lngforum['addvote'"> . '</a>
';
echo '<a>' . $lngforum['topicrename'"> . '</a>
';
?>
Tìm tiếp:
if ($type1['close'">)
echo '<div class="rmenu">' . $lngforum['topicdeletewho'"> . ': <b>' . $type1['closewho'"> . '</b>';
elseif (!empty($type1['closewho'">) && $rights >= 7)
echo '<div><small>' . $lngforum['topicdeletewhocancel'"> . ': <b>' . $type1['closewho'"> . '</b></small></div>';
?>
Thay bằng:
if ($type1['close'">)
echo '<div class="rmenu">' . $lngforum['topicdeletewho'"> . ': <b>' . $type1['closewho'"> . '</b>';
elseif (!empty($type1['closewho'">) && $rights >= 7)
echo '<div><small>' . $lngforum['topicdeletewhocancel'"> . ': <b>' . $type1['closewho'"> . '</b></small></div>';
// hien thi user kiem duyet
if (!empty($type1['kiemduyetwho'">)) {
echo '<div>Chủ đề được kiểm duyệt bởi: <b>' . $type1['kiemduyetwho'"> . '</b></div>';
}
?>
Mở incfiles/head.php
Tìm:
if (!empty($ban))
echo '<div class="alarm">' . $lng['ban'"> . ' <a>' . $lng['indetail'"> . '</a>';
?>
Chèn dưới:
if ($headmod != "kiemduyet" && $rights > 3) {
$kiemduyet = mysqlresult(mysql_query("SELECT COUNT() FROM forum WHERE type = 't' and kedit='0' AND kiemduyet != '1' AND close!='1'"), 0);
if ($kiemduyet > 0) {
echo "<div><a><b><span style="color: red;">Có $kiemduyet chủ đề đang chờ kiểm duyệt</span></b></a></div>";
}
}
?>
Xong!