Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2003, 09:28 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-12-2003, 05:06 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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-- ^^
Reply With Quote
  #3  
Old 02-12-2003, 05:16 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That starts a thread in the mod's forum, but does not include a title, or text about the report
Reply With Quote
  #4  
Old 02-12-2003, 05:18 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry my fault, have corrected the mod above
Reply With Quote
  #5  
Old 02-12-2003, 05:19 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BTW, thanks for taking this on, i think its a great idea
Reply With Quote
  #6  
Old 02-12-2003, 05:22 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 02-12-2003, 05:30 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 02-12-2003, 05:40 PM
Joe Joe is offline
 
Join Date: Oct 2001
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
  #9  
Old 02-12-2003, 10:08 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx

i think i'll release it tomorrow or friday...
have got som ideas which i have to test before releasing
Reply With Quote
  #10  
Old 02-13-2003, 04:18 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07347 seconds
  • Memory Usage 2,273KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete