Not tested, but should work:
Edit Newthread.php, find:
-- cut --
if ($visible==1) {
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastpost er='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
}
-- cut --
BEFORE that add:
-- cut --
if ($visible!=1)
{
$title1="Message Moderation: $title";
$message1="Moderation Required for message ".$title.":\n-----------\n\n".$message;
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignatur e,iconid,messageread,folderid) VALUES (NULL,1,1,1,'".addslashes(htmlspecialchars($title1 ))."','".addslashes($message1) ."',".time().",'$signature','$iconid',1,0)");
}
-- cut --
Add the same line BEFORE that line in newreply.php
-- cut --
$postid=$DB_site->insert_id();
indexpost($postid,0);
if ($visible) {
if ($threadinfo[replycount]%10==0) {
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,last poster='".addslashes($postuser name)."' WHERE threadid='$threadid'");
-- cut --
This will sent a notification PM to Admin (Userid 1) whenever a moderation required for a new message. (But he will NOT get an email for this PM! Just the PM..)
Enjoy..
Regards,
|