sv1cec |
05-02-2005 03:19 PM |
I have to assume that you have not perform the changes properly. As far as I can say, that should work fine. Here is that part of the private.php file, that handles the warning.
In private.php find:
PHP Code:
$signature = intval($pm['signature']);
$iconid = intval($pm['iconid']);
$disablesmilies = iif($pm['disablesmilies'], 0, 1);
Below that, there should be something as shown below:
PHP Code:
if ($vboptions['warn_automaticpm'] == 1)
{
$Protected_Usergroups=explode("|",$vboptions['warn_protected_usergroups']);
if($Protected_Usergroups[0])
{
foreach($Protected_Usergroups as $pro)
{
if($pro==$bbuserinfo['usergroupid'])
{
$userprotected=1;
}
}
}
if ($bbuserinfo['userid'] != 1 AND $userprotected != 1 AND $wehavecensoredwords == 1)
{
// Get Warning Types
$warn_type="";
$warn_type=$DB_site->query_first("select * from ".TABLE_PREFIX."warning_types WHERE warn_name='ObsceneWords'");
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext_warned\n\t(fromuserid, fromusername, title, before_title, message, before_message, touserarray, dateline)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '$title', '$before_title', '$message', '$before_message', '" . addslashes(serialize($tostring)) . "', " . TIMENOW . ")");
$pmtextid_temp = $DB_site->insert_id();
$wcomment="(This is an automatic warning, no moderator was involved.)";
$wcomment1="(This is an automatic warning, no moderator was involved.) ITC: $pmtextid_temp";
if ($alert=='')
{
$alert='No';
}
warn_calculations($warn_type['tid'], $wcomment1, $_POST['postid'], $bbuserinfo, $vboptions['warn_automatic_warner'], $alert);
$thread1="A Private Message you send\n\nOur Internal Tracking Code: $pmtextid_temp\n\nQuote this number if you have a dispute.";
$thread2="A Private Message you send\n\nOur Internal Tracking Code: $pmtextid_temp\n\nQuote this number if you have a dispute.";
$warnerdata=$DB_site->query_first("select username, email from ".TABLE_PREFIX."user where userid='{$vboptions['warn_automatic_warner']}'");
warn_notify($thread1, $thread2, $bbuserinfo, $warnerdata['email'], $warnerdata['username'], $vboptions['warn_automatic_warner'], $warn_type, $level, $wcomment, $alert);
}
}
// End of automated warnings things
// I hope it works OK.
$message=$pm_message;
// insert private message text
if ($bbuserinfo['userid'] == $vboptions['warn_collector'] and $pm['sender']!='')
{
$sender=$pm['sender'];
$w1=$DB_site->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid=$sender");
$sendername=$w1[username];
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($sender, '" . addslashes($sendername) . "', '$title', '$message', '" . addslashes(serialize($tostring)) . "', $iconid, " . TIMENOW . ", $signature, $disablesmilies)");
}
else
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '$title', '$message', '" . addslashes(serialize($tostring)) . "', $iconid, " . TIMENOW . ", $signature, $disablesmilies)");
}
// get the inserted private message id
$pmtextid = $DB_site->insert_id();
// save a copy into $bbuserinfo's sent items folder
if ($pm['savecopy'])
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, folderid, messageread) VALUES ($pmtextid, $bbuserinfo[userid], -1, 1)");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1 WHERE userid=$bbuserinfo[userid]");
}
foreach (array_keys($sendto) AS $username)
{
$user = &$checkedusers["$username"];
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid) VALUES ($pmtextid, $user[userid])");
if ($pm['receipt'])
{
$receiptSql[] = "(" . $DB_site->insert_id() . ", $bbuserinfo[userid], $user[userid], '" . addslashes($user['username']) . "', '$title', " . TIMENOW . ")";
}
if ($user['pmpopup'])
{
$pmpopupSql[] = $user['userid'];
}
else
{
$pmtotalSql[] = $user['userid'];
}
if ($user['emailonpm'] AND $user['usergroupid'] != 3 AND $user['usergroupid'] != 4)
{
$touserinfo = &$user;
eval(fetch_email_phrases('pmreceived', $touserinfo['languageid'], '', 'email'));
vbmail($touserinfo['email'], $emailsubject, $emailmessage);
}
}
// insert receipts
I hope you get it straighened out.
Rgds
|