Icy Phoenix

     
 


Post new topic  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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:
 
ieioSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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:
 
ieioSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How Can Admin Get Notifications For Admonishments 
 
i think it could be in card.php ( first step :P)
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How Can Admin Get Notifications For Admonishments 
 
maybe from #398
Code: [Download] [Hide] [Select]
    // 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:
 
ieioSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How Can Admin Get Notifications For Admonishments 
 
nobody can help me?  
 




____________
rescued by MG :10k_0025:
 
ieioSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How Can Admin Get Notifications For Admonishments 
 
a quick solution (now i have not more time to do a better solution)

replace

      
Code: [Download] [Hide] [Select]
  $emailer->send();

with
Code: [Download] [Hide] [Select]
mail("admin@email.com","users are warn","$userdata['username'] etc...");
$emailer->send();


replace admin @ email.com with the admins email
 




____________
jack of all trades, master of none
http://www.mieloma.com/ - http://www.casimedicos.com/ - http://www.egalego.com/ - http://www.casimedicos.com.es/ - http://www.medicosmir.com/
 
casimedicosSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron