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)

Foxtroter 07-02-2001 01:04 AM

Quote:

Originally posted by kdog316
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

add another } after this
PHP Code:

      $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)"); 

there should be two.

anyway i believe two other people have answered ur question.

ptegan 08-14-2001 12:48 PM

Thx !!

Nice hack.

idban 09-18-2001 04:57 AM

i just modified report.php to make this possible

JJR512 09-19-2001 08:24 AM

Quote:

Originally posted by daydreamer
"go into your control panel and select an option"

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

dd

Quote:

Originally posted by daydreamer
Duh, found it.
Sorry, I haven't found it yet! What option am I looking for and on which control panel (admin cp, my own user cp, what?) I can't find anything anywhere!

Also...maybe this is related to the option that I haven't set because I don't know what the option is or where it is, but after installing it, I try clicking the Report link in any thread in any forum and I get the new error message "Sorry, this feature is disabled" or whatever.

Sephi 01-22-2002 07:42 PM

Quote:

Originally posted by idban
i just modified report.php to make this possible
Thank You :D
This hack works perfectly :p

See 4 Later !

Omero 02-06-2002 10:53 AM

Bug found! If ' or " is present in the report text and the notify with PM is active, the mysql INSERT into private messages fail with mysql error!

Here is the workaround:

Change this:

PHP Code:


 
if ($reporttomoderator == || $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)");
        } 

into this

PHP Code:

 if ($reporttomoderator == || $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','".addslashes($message)."',".time().",0,0,0,0)");
        } 

This will fix the bug, by adding the proper slashes where they are needed ;)

Stoned Gecko 02-08-2002 12:04 AM

Works great!!! Thanks!

Remi 04-07-2002 07:47 PM

Does this hack work also with 2.2.4?

Thanks

Erwin 04-08-2002 01:09 AM

Yes. Also with 2.2.5 - it's one of the best hacks around and should be standard in 3.0 methinks.

Remi 04-08-2002 01:13 PM

Thanks Erwin

I followed the instructions, but I could not find some of the Text I was asked to replace.

I must be doing something wrong :D

I will try again today :)


All times are GMT. The time now is 11:23 PM.

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.01584 seconds
  • Memory Usage 1,765KB
  • 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
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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