Quote:
02-07-03 at 09:09 PM Erwin said this in Post #37
To integrate this into your usual reporting methods, you do NOT have to make a new file or make new templates up, or add any extra queries to search the message - everything is in report.php already.
To achieve the same result, while being able to email mods (and if you have the PM mod hack, PM mods as well), just do this (no need to do anything else):
Open report.php.
Find:
PHP Code:
$url = str_replace("\"", "", $url);
ABOVE this, ADD:
PHP Code:
$modforum="100";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','Post Alert - $postinfo[username]','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='$bbuserinfo[username]' WHERE forumid='$modforum'");
Change:
$modforum="100";
To the forumid of your admin forum.
Done! 
P.S. I hope Overgrow doesn't mind me posting this here - I could post this in a separate hack, but after all, it's his idea, and he should get the credit.
|
When I try this, I get a parse error:
PHP Code:
Parse error: parse error, unexpected ')' in /home/friend/public_html/forum/report.php on line 64
Any ideas? :-s
|