|
Page 1 of 1
|
ieio 
Joined: April 2007
Posts: 55
Location:
|
 How Can Admin Get Notifications For Admonishments
Hi to everyone
in our forum we have about 20 moderators, sometimes they are wrong... is it possible that admins get a notification via PM when moderators admonish/ban users? something like that
user xxx admonished/banned by yyy (when?) (post?)
thank you in advance
____________ rescued by MG :10k_0025:
|
#1 Wed 18 Apr, 2007 16:45 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
Zuker 
Joined: August 2006
Posts: 2134
Location:  BA
|
 Re: How Can Admin Get Notifications For Admonishments
I can't find where is the function that notify users when are warn :@
If i get that, i could make what u want ( i think  )
____________ ? Zuker - EDDB - LPM - Sharefields
|
#2 Thu 19 Apr, 2007 21:41 |
|
ieio 
Joined: April 2007
Posts: 55
Location:
|
 Re: How Can Admin Get Notifications For Admonishments
thank you for helping me  i've looked for it but i couldn't find anything
____________ rescued by MG :10k_0025:
|
#3 Fri 20 Apr, 2007 09:40 |
|
Zuker 
Joined: August 2006
Posts: 2134
Location:  BA
|
 Re: How Can Admin Get Notifications For Admonishments
i think it could be in card.php ( first step :P)
____________ ? Zuker - EDDB - LPM - Sharefields
|
#4 Fri 20 Apr, 2007 12:51 |
|
ieio 
Joined: April 2007
Posts: 55
Location:
|
 Re: How Can Admin Get Notifications For Admonishments
maybe from #398
// se if the user are to be banned, if so do it ...
if ( ($the_user['user_warnings'] + 1) >= $board_config['max_user_bancard'] )
{
$sql = 'SELECT ban_userid FROM ' . BANLIST_TABLE . ' WHERE ban_userid="' . $poster_id . '"';
if( $result = $db->sql_query($sql) )
{
if ( (!$db->sql_fetchrowset($result)) && ($poster_id != ANONYMOUS) )
{
// insert the user in the ban list
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid) VALUES ($poster_id)";
if (!$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql);
}
// update the user table with new status
$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in="0" WHERE session_user_id="' . $poster_id . '"';
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update banned sessions from database", "", __LINE__, __FILE__, $sql);
}
$no_error_ban=true;
$message = $lang['Ban_update_red'];
$e_temp = 'ban_block';
// $e_subj = $lang['Ban_blocked'];
}
else
{
$no_error_ban = true;
$message = $lang['user_already_banned'];
}
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "", __LINE__, __FILE__, $sql);
}
}
else
{
// the user shall not be baned this time, update the counter
$message = sprintf($lang['Ban_update_yellow'], ($the_user['user_warnings'] + 1), $board_config['max_user_bancard']) . '<br /><br />' . sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.' . $phpEx . '?mode=post&u=' . $poster_id) . '">', '</a>');
$no_error_ban = true;
$e_temp = 'ban_warning';
// $e_subj = $lang['Ban_warning'];
$db->clear_cache();
}
}
if ($no_error_ban)
{
$sql = 'SELECT username, user_warnings, user_email, user_lang FROM ' . USERS_TABLE . ' WHERE user_id="' . $poster_id . '"';
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't find the users personal information", "", __LINE__, __FILE__, $sql);
}
$warning_data = $db->sql_fetchrow($result);
if (!empty($warning_data['user_email']))
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$script_name = preg_replace('/^/?(.*?)/?$/', '1', trim($board_config['script_path'])). '/' . VIEWTOPIC_MG;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "TO: '". $warning_data['username']. "' <" . $warning_data['user_email'] . ">rn";
$email_headers .= ($userdata['user_email'] && $userdata['user_viewemail']) ? "FROM: "" . $userdata['username'] . "" <" . $userdata['user_email'] . ">rn" : "FROM: "" . $board_config['sitename'] . "" <" . $board_config['board_email'] . ">rn";
$emailer->use_template($e_temp, stripslashes($warning_data['user_lang']));
$emailer->email_address($warning_data['user_email']);
//$emailer->set_subject($e_subj);
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'WARNINGS' => $warning_data['user_warnings'],
'TOTAL_WARN' => $board_config['max_user_bancard'],
'POST_URL' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . '=' . $post_id . '#p' . $post_id,
'EMAIL_SIG' => str_replace("<br />", "n", "-- n" . $board_config['board_email_sig']),
'WARNER' => $userdata['username'],
'BLOCK_TIME' => $block_time,
'WARNED_POSTER' => $warning_data['username'])
);
$emailer->send();
$emailer->reset();
}
else
{
$message .= '<br/><br/>' . $lang['user_no_email'];
}
}
else
{
$message = 'Error card.php file';
}
$message .= ( $post_id != '-1' ) ? '<br /><br />' . sprintf($lang['Click_return_viewtopic'], '<a href="' . append_sid(VIEWTOPIC_MG . '?' . POST_POST_URL . '=' . $post_id . '#p' . $post_id) . '">', '</a>') : '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid(FORUM_MG). '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
include($phpbb_root_path . 'includes/page_tail.' . $phpEx);
?>
thank you
____________ rescued by MG :10k_0025:
|
#5 Fri 20 Apr, 2007 12:59 |
|
ieio 
Joined: April 2007
Posts: 55
Location:
|
 Re: How Can Admin Get Notifications For Admonishments
nobody can help me?
____________ rescued by MG :10k_0025:
|
#6 Tue 24 Apr, 2007 18:01 |
|
casimedicos 
Joined: August 2006
Posts: 241
Location:  Galicia (Spain)
|
 Re: How Can Admin Get Notifications For Admonishments
a quick solution (now i have not more time to do a better solution)
replace
with
mail("admin@email.com","users are warn","$userdata['username'] etc...");
$emailer->send();
replace admin @ email.com with the admins email
|
#7 Tue 24 Apr, 2007 18:30 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: How Can Admin Get Notifications For Admonishments
To enable this feature you should also create an extra template for emails.
When I have some free time, I'll have a try.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#8 Wed 25 Apr, 2007 02:37 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|