vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Report post to moderator -> PM or e-mail (https://vborg.vbsupport.ru/showthread.php?t=18305)

JohnM 05-29-2001 04:29 PM

First of all, it's against the license to post files. Please remove it.

for your question, your tags were a bit messed up :p

your while() loop part should be:

Code:

  while ($moderator=$DB_site->fetch_array($moderators)) {
    if ($reporttomoderator == 1 || $reporttomoderator == 3) {
              eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
              eval("\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
              mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
            }
            if ($reporttomoderator == 2 || $reporttomoderator == 3) {
              eval("\$message = \"".gettemplate("pm_reportbadpost",1,0)."\";");
              eval("\$subject = \"".gettemplate("pmsubject_reportbadpost",1,0)."\";");
              $DB_site->query("INSERT INTO privatemessage  (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignature,iconid,messageread,folderid) VALUES (NULL,$moderator[userid],$moderator[userid],$bbuserinfo[userid],'$subject','$message',".time().",0,0,0,0)");
            }
  }


JohnM 05-29-2001 04:32 PM

Quote:

Originally posted by DEMOLiTiON
ok I got this working now :)
but the reports are only send to one moderator.. is there a way to send it to all moderators and admins?
thnx

it should send it to all of them... I don't see why it wouldn't... PM me your while loop part of report.php

Psycho 05-29-2001 10:16 PM

I wasnt thinking on the file, but I appreciate your help. It works great now. Thank you very much :)

Psycho 05-31-2001 09:10 PM

I know your probably getting sick of me. Ive put that code into my file which seemed to have fixed it. However, when I look at the private message it give me this

("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title
,message,dateline,showsignature,iconid,messageread
,folderid) VALUES (NULL,1,1,1,',',".time().",0,0,0,0)");

DEMOLiTiON 06-01-2001 05:17 AM

JohnM, I emailed you my report.php, please look at it :)

JohnM 06-01-2001 10:51 PM

"Look at the private message"?

Demolition: it shouldn't be doing that. are you sure you have more than one moderator? ;)

kdog316 06-02-2001 03:13 AM

i keep getting parase error and here is what my code looks like

oh and the parase is on line 68 which is ?>





PHP Code:

 while ($moderator=$DB_site->fetch_array($moderators)) { 
    if (
$reporttomoderator == || $reporttomoderator == 3) { 
      eval(
"\ = \"".gettemplate("email_reportbadpost",1,0)."\";"); 
      eval(
"\ = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";"); 
      
mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>"); 
    } 
    if (
$reporttomoderator == || $reporttomoderator == 3) { 
      eval(
"\ = \"".gettemplate("pm_reportbadpost",1,0)."\";"); 
      eval(
"\ = \"".gettemplate("pmsubject_reportbadpost",1,0)."\";"); 
      
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignature,iconid,messageread,folderid) VALUES (NULL,$moderator[userid],$moderator[userid],$bbuserinfo[userid],'$subject','$message',".time().",0,0,0,0)"); 
    }

  
$url str_replace("\""""$url);
  eval(
"standardredirect(\"".gettemplate("redirect_reportthanks")."\",\"$url\");");
}
? > 

with out the space after the question mark

jojo85 06-02-2001 04:14 AM

Good idea,nice hack,
CONGRATS :D

daydreamer 06-28-2001 01:15 AM

"go into your control panel and select an option"

You lost me there... select an option where?

dd

daydreamer 06-28-2001 01:51 AM

Duh, found it.


All times are GMT. The time now is 02:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01019 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete