I quickly made a mod so staff can disable members posting until they read a message and accept it, there isn't currently a mod to do this so I made one.
This is good when autoposters ignore PM's and warnings, It gives another option rather than banning.
I might as well share it here then I cant loose it )
SQL
Open: includes/functions.php
Find
Add After
Open: language/en/common.php
Find
Add After
Open: adm/style/acp_users_overview.html
Find
Add After
Open: includes/acp/acp_users.php
Find
Add After
Find
Add After
Find
Add After
Find
Add After
ACP User Management Disable Posting.
Disabled Profile.
This is good when autoposters ignore PM's and warnings, It gives another option rather than banning.
I might as well share it here then I cant loose it )
SQL
PHP:
ALTER TABLE phpbb_users ADD user_accept_rules SMALLINT( 1 ) NOT NULL DEFAULT '0';
Open: includes/functions.php
Find
PHP:
header('Pragma: no-cache');
Add After
PHP:
if ($user->data['user_accept_rules'] == 1 && $user->data['is_registered'] && !$user->data['is_bot'] && (request_var('mode', '') != 'terms'))
{
if (confirm_box(true))
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_accept_rules = 0
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
}
else
{
confirm_box(false, sprintf($user->lang['NEW_RULES'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms') . '">', '</a>'));
header("Location: " . append_sid("{$phpbb_root_path}ucp.$phpEx?mode=logout&sid=" . $user->session_id));
}
}
Open: language/en/common.php
Find
PHP:
'NEW_POSTS' => 'New posts',
Add After
PHP:
'NEW_RULES' => 'Your account has been temporary disabled by staff due to ignoring warnings or private messages.<br/><br/>Please check for any private messages or warnings issued, if you ignore this polite warning a ban will likely be issued.<br/><br/><br/>After you confirm (Yes), your account will be restored.<br/>',
'UPDATE_TERMS' => 'Accept Terms',
Open: adm/style/acp_users_overview.html
Find
PHP:
<dl>
<dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
Add After
PHP:
<dl>
<dt><label for="user_force">Disable Posting:</label><br /><span>Force Member to read a warning message before being able to post again.</span></dt>
<dd><label><input type="radio" class="radio" name="user_force" value="1"<!-- IF S_USER_FORCE --> id="user_force" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="user_force" value="0"<!-- IF not S_USER_FORCE --> id="user_force" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
Open: includes/acp/acp_users.php
Find
PHP:
'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
Add After
PHP:
'user_force' => request_var('user_force', ($user_row['user_accept_rules '] == 0) ? 1 : 0),
Find
PHP:
// Which updates do we need to do?
Add After
PHP:
$update_user_force = ($user_row['user_accept_rules '] != $data['user_force']) ? $data['user_force'] : false;
Find
PHP:
trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
}
}
}
Add After
PHP:
if ($update_user_force !== false)
{
if ($data['user_force']==1)
{
$sql_ary['user_accept_rules'] = 1;
}
else
{
$sql_ary['user_accept_rules'] = 0;
}
add_log('user', $user_id, $user_row['username'].'- Forced to read warning page', $user_row['username'], $update_user_force);
}
Find
PHP:
'S_USER_IP' => ($user_row['user_ip']) ? true : false,
Add After
PHP:
'S_USER_FORCE' => ($user_row['user_accept_rules'] == 1) ? true : false,
ACP User Management Disable Posting.
Disabled Profile.