Преимущества очевидны - меньше релодов страници, соотвественно это и удобнее и быстрее.
Но всё же не могли бы вы скинуть мне необходимые фиксы? И ещё там есть инструкция как обновлять мод?
Спасибо!
Raisin писал(а):simple karma
Mafin писал(а):этому пользователю (т.е. кому уже менял
Fatal error: Call to undefined function user_ban() in /home/motobrat/public_html/includes/mods/functions_karma.php on line 1305// Okay, all tests passed and we'll ban user
$mode = 'ban_userid'; // Ban by user id
$ban = $clean_name; // Banned user
$ban_len = 0; // Permanent ban
$ben_len_other = ''; // This field user, if baning not permanent
$ban_exclude = ''; // We don't have excludes from banning
$ban_reason = $this->config['ban_reason']; // Ban reason showed at ACP/MCP
$ban_give_reason = $this->config['ban_give_reason']; // Ban reason showed to user
// Ban!
1305 user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
} global $db, $user;
// Catch username global $db, $user, $phpbb_root_path, $phpEx;
// Load additional user functions, if not loaded
if (!function_exists('user_ban'))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
// Catch username 
[phpBB Debug] PHP Notice: in file [ROOT]/includes/mods/functions_karma.php on line 1311: Undefined variable: ban_len_other
Warning: Cannot modify header information - headers already sent by (output started at /home/motobrat/public_html/includes/functions.php:3971) in /home/motobrat/public_html/includes/functions.php on line 4877
Warning: Cannot modify header information - headers already sent by (output started at /home/motobrat/public_html/includes/functions.php:3971) in /home/motobrat/public_html/includes/functions.php on line 4879
Warning: Cannot modify header information - headers already sent by (output started at /home/motobrat/public_html/includes/functions.php:3971) in /home/motobrat/public_html/includes/functions.php on line 4880
Warning: Cannot modify header information - headers already sent by (output started at /home/motobrat/public_html/includes/functions.php:3971) in /home/motobrat/public_html/includes/functions.php on line 4881Не указан режим.
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason); $ben_len_other = ''; // This field user, if baning not permanent// Ban submitted?
if ($bansubmit)
{
// Grab the list of entries
$ban = utf8_normalize_nfc(request_var('ban', '', true));
$ban_len = request_var('banlength', 0);
$ban_len_other = request_var('banlengthother', '');
$ban_exclude = request_var('banexclude', 0);
$ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
$ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
if ($ban)
{
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
}
}
else if ($unbansubmit)
{
$ban = request_var('unban', array(''));
if ($ban)
{
user_unban($mode, $ban);
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
}
} // Ban submitted?
if ($bansubmit)
{
// Grab the list of entries
$ban = request_var('ban', '', ($mode === 'user') ? true : false);
if ($mode === 'user')
{
$ban = utf8_normalize_nfc($ban);
}
$ban_len = request_var('banlength', 0);
$ban_len_other = request_var('banlengthother', '');
$ban_exclude = request_var('banexclude', 0);
$ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
$ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
if ($ban)
{
if (confirm_box(true))
{
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'mode' => $mode,
'ban' => $ban,
'bansubmit' => true,
'banlength' => $ban_len,
'banlengthother' => $ban_len_other,
'banexclude' => $ban_exclude,
'banreason' => $ban_reason,
'bangivereason' => $ban_give_reason)));
}
}
}
Вернуться в Поддержка модов для phpBB 3.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0