vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Report link starts thread in Mod's forum. (https://vborg.vbsupport.ru/showthread.php?t=48815)

Joe 02-11-2003 09:28 PM

Report link starts thread in Mod's forum.
 
Rather then have the report link send a thread to all moderators, how about make it start a thread in the Mod's forum? That would come in handy when talking about reported posts / problems. Moderators could also note of what was done.

Xenon 02-12-2003 05:06 PM

hmm, really a nice idea :)

open report.php
find
PHP Code:

  if ($DB_site->num_rows($moderators)==0) {
    
// get admins if no mods
    
$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND (usergroup.cancontrolpanel=1 OR usergroup.ismoderator=1)");
  }

  while (
$moderator=$DB_site->fetch_array($moderators)) {
    eval(
"\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
    eval(
"\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");

    
mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
  } 

replace with:

PHP Code:

    eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
    eval(
"\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");

$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()."','--Modforumid--','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','4','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','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','".addslashes($message)."',0,0,'$ipaddress',4,'1')"); 

think this should work, just insert the right id for --Modforumid-- ^^

Joe 02-12-2003 05:16 PM

That starts a thread in the mod's forum, but does not include a title, or text about the report :)

Xenon 02-12-2003 05:18 PM

sorry my fault, have corrected the mod above :)

Joe 02-12-2003 05:19 PM

BTW, thanks for taking this on, i think its a great idea :)

Joe 02-12-2003 05:22 PM

Yay, that worked, now off to edit some templates to make it look good :)

Thank you much, how about we move this to the completed hacks forum?

Xenon 02-12-2003 05:30 PM

you're welcome :)

well, i'll make the instructions a bit clearer and release it :)
it's just the fast version, could be made in a nicer way also ;)

Joe 02-12-2003 05:40 PM

Good deal, Here is the change i made for the templates:

In email_reportbadpost

Code:

$bbuserinfo[username] has reported this post:

[url ]http://www.yourURL.com/showthread.php?postid=$postid#post$post[postid][ /url]

This is the reason that the user gave:

$reason

----
Please reply to this thread on how the above was dealt with.

And in emailsubject_reportbadpost
Code:

Reported post in $thread[title]

Xenon 02-12-2003 10:08 PM

thx :)

i think i'll release it tomorrow or friday...
have got som ideas which i have to test before releasing :)

Erwin 02-13-2003 04:18 AM

Hey, I wrote the same hack in the thread by Overgrow when he released his create new thread in mod forum hack (he's done it) but which does not incorporate the email or PM bits.

I just used a similar piece of code to yours Xenon that uses the email templates as well. :)


All times are GMT. The time now is 01:37 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.01093 seconds
  • Memory Usage 1,743KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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