[phpbb外掛]簡易檢舉1.0 改成群組會員才能檢舉
發表於 : 2005-10-08 3:24 pm
- 代碼: 選擇全部
#
#-----[ ADD SQL 加入SQL語法 ]----------------------------------
#
ALTER TABLE `phpbb_forums` ADD `auth_accuse` tinyint(2) UNSIGNED DEFAULT '2' NOT NULL AFTER auth_announce;
ALTER TABLE phpbb_auth_access ADD auth_accuse TINYINT (1) not null AFTER auth_announce;
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
$order_sql = ( empty($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, f.auth_vote
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
, f.auth_accuse
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments,f.forum_sub " . $count_sql . "
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, f.auth_vote
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
, f.auth_accuse
#
#-----[ OPEN ]------------------------------------------------
#
accuse.php
#
#-----[ FIND ]------------------------------------------------
#
if( !$userdata['session_logged_in'] )
{
// "LOGIN / REGISTER TO RATE THIS POST" OPTION
message_die(GENERAL_MESSAGE, $lang['Must_be_logged_to_accuse']);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
if(!$is_auth['auth_accuse'])
{
message_die(GENERAL_MESSAGE, $lang['Not_group_moderator']);
}
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_forumauth.php
#
#-----[ FIND ]------------------------------------------------
#
$simple_auth_ary = array(
0 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
1 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
2 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
3 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
4 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
5 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
6 => array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
),
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, AUTH_ACL
#
#-----[ FIND ]------------------------------------------------
#
$forum_auth_fields = array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, 'auth_accuse'
#
#-----[ FIND ]------------------------------------------------
#
']);
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Global announcement MOD
'auth_accuse' => $lang['Accuse']);
// End add - Global announcement MOD
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_ug_auth.php
#
#-----[ FIND ]------------------------------------------------
#
$forum_auth_fields = array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, 'auth_accuse'
#
#-----[ FIND ]------------------------------------------------
#
'auth_announce' => AUTH_ANNOUNCE,
#
#-----[ FIND ]------------------------------------------------
#
);
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Global announcement MOD
'auth_accuse' => AUTH_ACCUSE);
// End add - Global announcement MOD
#
#-----[ FIND ]------------------------------------------------
#
']);
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Global announcement MOD
'auth_accuse' => $lang['Accuse']);
// End add - Global announcement MOD
#
#-----[ FIND ]------------------------------------------------
#
SET auth_view = 0,
WHERE
#
#-----[ IN-LINE FIND ]----------------------------------------
#
WHERE
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, auth_accuse = 0
#
#-----[ FIND ]------------------------------------------------
#
SET auth_view = 0,
WHERE
#
#-----[ IN-LINE FIND ]----------------------------------------
#
WHERE
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, auth_accuse = 0
#
#-----[ OPEN ]------------------------------------------------
#
includes/auth.php
#
#-----[ FIND ]------------------------------------------------
#
case AUTH_ALL:
$a_sql = '
#
#-----[ IN-LINE FIND ]----------------------------------------
#
';
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, a.auth_accuse
#
#-----[ FIND ]------------------------------------------------
#
$auth_fields = array(
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, 'auth_accuse'
#
#-----[ FIND ]------------------------------------------------
#
default:
break;
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
case AUTH_ACCUSE:
$a_sql = 'a.auth_accuse';
$auth_fields = array('auth_accuse');
break;
#
#-----[ OPEN ]------------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
define('AUTH_ATTACH', 11);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('AUTH_ACCUSE', 13);
#
#-----[ OPEN ]------------------------------------------------
#
language/你的語系/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
$lang['Accuse'] ='檢舉';