vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Admin receive PM when need moderate new post/thread (https://vborg.vbsupport.ru/showthread.php?t=38083)

inetd 04-30-2002 06:10 PM

Admin receive PM when need moderate new post/thread
 
PLease make this hack:
Admin receive PM when need moderate new post/thread.

Logician 04-30-2002 08:42 PM

Not tested, but should work:

Edit Newthread.php, find:
-- cut --
if ($visible==1) {
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastpost er='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
}
-- cut --

BEFORE that add:

-- cut --
if ($visible!=1)
{
$title1="Message Moderation: $title";
$message1="Moderation Required for message ".$title.":\n-----------\n\n".$message;
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignatur e,iconid,messageread,folderid) VALUES (NULL,1,1,1,'".addslashes(htmlspecialchars($title1 ))."','".addslashes($message1) ."',".time().",'$signature','$iconid',1,0)");
}
-- cut --

Add the same line BEFORE that line in newreply.php
-- cut --
$postid=$DB_site->insert_id();

indexpost($postid,0);

if ($visible) {
if ($threadinfo[replycount]%10==0) {
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,last poster='".addslashes($postuser name)."' WHERE threadid='$threadid'");
-- cut --

This will sent a notification PM to Admin (Userid 1) whenever a moderation required for a new message. (But he will NOT get an email for this PM! Just the PM..)

Enjoy..

Regards,

inetd 05-02-2002 06:32 PM

don't work.
blank page after post reply and create thread :(

Logician 05-02-2002 06:48 PM

I will check..

Logician 05-02-2002 07:55 PM

edited the code.. Apply again..it's now working.. tested and approved! ;)

inetd 05-02-2002 08:08 PM

Work's fine! Thanks :)
Post this hack in Full Release :)

Logician 05-02-2002 08:39 PM

Quote:

Originally posted by inetd
Work's fine! Thanks :)
Post this hack in Full Release :)

Honestly it seems to me that this is a little "personal" hack which appeals only to you.

I dont think other people would be interested with this hack, so I didnt plan to publish it. I replied it so as to help you, not to create a new hack to publish..

Anyway if someone else reading this thread finds it useful and thinks it should be published, holler! I can publish it provided that people think it is useful..

Regards,
Logician

MrBojangle1 05-03-2002 12:57 AM

O_O i added it, lol, its very neat i will definatly use it :)

Velocd 05-03-2002 02:03 AM

I'll consider it ^_^

inetd 05-03-2002 03:43 PM

Logician, please create addon. I need see thread name, forum name and link for moderate message in PM.
Please :) :tup:


All times are GMT. The time now is 12:27 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.01825 seconds
  • Memory Usage 1,728KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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