Guest

email you reports

By: jmyeom on Jan 12th, 2012  |  syntax: None  |  size: 1.19 KB  |  hits: 95  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. UPDATED: 15/02/2012
  2.  
  3. fist, in your config, add this anywhere (i would say to make it look decent, add it under "Imageboard info")
  4.  
  5.  
  6. $cf['KU_EMAIL']           = "email@axample.com"; // Enter the email you wish for reports to be emailed to, leave blank if you do not wish to be emailed
  7.  
  8. in: inc/classes/board-post.class.php
  9.  
  10. find: function Report() {    (its right at the bottom of the page :P)
  11.  
  12.  
  13. before: return $tc_db->Execute(blahblahblahblahbnlah
  14. (note, put it before this line, you must put it before this line or it will not work!!!!!!!!!!!!!!!!!!!!!!}
  15. put this:
  16.  
  17.  
  18.                 if(KU_EMAIL != ""){
  19.                     $reportmsg = '
  20. <html>
  21. <head>
  22.   <title>Post reported at '.KU_WEBPATH.'</title>
  23. </head>
  24. <body>
  25.   <table>
  26.     <tr>
  27.       <th>Board</th><th>Postid</th><th>When</th><th>Reason</th>
  28.     </tr>
  29.     <tr>
  30.       <th>'.$tc_db->qstr($this->board['name']).'</th><th>'.$tc_db->qstr($this->post['id']).'</th><th>'.time().'</th><th>'.$tc_db->qstr($_POST['reportreason']).'</th>
  31.     </tr>
  32.   </table>
  33. </body>
  34. </html>
  35. ';
  36.                         $headers .= "Content-type: text/html\r\n";
  37.                     mail(KU_EMAIL, 'Post reported at '.KU_WEBPATH, $reportmsg, $headers);
  38.                 }