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:

Logician 05-03-2002 05:24 PM

Quote:

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

ok but give me sometime, I am quite busy nowadays. :)

If I dont reply until tuesday, remind me! ;)

Regards,
Logician

inetd 05-03-2002 05:29 PM

Quote:

ok but give me sometime, I am quite busy nowadays. :)
If I dont reply until tuesday, remind me! ;)
Ok :) ;) :)

Sketch 05-03-2002 09:42 PM

I used it and I think it should be added as a new hack. Those of my mods that are not vBulletin inclined, may not think to go and look for things that need moderation--I'm still training them. To have a hack that contacts them is great and I think it would benefit others as well. Thanks.

Sketch

Logician 05-04-2002 06:01 AM

Quote:

Originally posted by Sketch
I used it and I think it should be added as a new hack. Those of my mods that are not vBulletin inclined, may not think to go and look for things that need moderation--I'm still training them. To have a hack that contacts them is great and I think it would benefit others as well. Thanks.

ok guys thx for the comments and feedback.

I'll first add the features inetd asked, then publish it in the New Hack Section.

Give me a few days..

Logician

Logician 05-06-2002 03:49 PM

1 Attachment(s)
Here you are Guys: (as I promised)

Reapply the hack attached to this message.

New Features:
* You can choose to be notified by pm or email or both
* You can set more than 1 members to be notified
* I added inetd's requests and more: Notification Message now includes Thread Title and URL, Forum Name and URL, Link to Moderate Message, Link to Email or PM the message Author.

Please apply the hack and tell me how it went. I tested and it's working here.

Enjoy.

Logician

Sketch 05-06-2002 03:54 PM

sweet! :D

I'll apply this this evening. You the man, logician.

Sketch

inetd 05-06-2002 04:03 PM

Logician, good work.
Please add name of author post in report :)

Logician 05-06-2002 04:13 PM

@inetd: Add:
$message1.="Author : ".$bbuserinfo[username]."\n";

after:
$message1="Moderation Required for message: \n";

inetd 05-06-2002 04:28 PM

Logician, and release hack :) THx for you!
You are the best!

steveprice 05-06-2002 04:39 PM

Hi Logician,

I installed and tested it, and it appears to work perfectly.

It's a real worksaver for me, and I appreciate it a lot. Thank you VERY MUCH.

Steve Price

Logician 05-06-2002 05:17 PM

yw.

I'm glad it helped you.

If you can send me a screenshot of the pm window you get, you'll help me release the hack..

steveprice 05-06-2002 05:22 PM

Hi Logician,

I don't use the PM feature at all on my boards, so I have the thing send me e-mails.

I feel badly that I cannot return the favor you so kindly did for me. It does work great in this mode, sending e-mail notifications to two administrators when new threads or replies enter the queue awaiting moderator approval.

Again, my thanks. And my apologies.

Steve Price

JoshFink 06-07-2002 08:37 PM

Great Hack, going to be very useful.

One question though, what would I need to do to put this into the vBulletin Options from the Admin CP.

Thanks

Josh

Logician 06-07-2002 09:18 PM

do you really need to put it there? To enable it just insert the code, to disable it, put a /* in the begining and */ at the end and this will disable the hack (or just delete the code). To add a feature to enable/disable it from vb options you have to add a field to your MYSQL and write codes to integrate it to Admin CP. IMO this is unnecessary and too time consuming for a small hack like this.. ;)

JoshFink 06-07-2002 09:22 PM

Yeah, your probably right it is a lot of work for a small hack.

I think I'm going to play around with it anyways and get it done. Once I do it once I never have to worry about it again.

Thanks

Josh

Meestor_X 10-02-2008 11:55 PM

Has anyone seen a similar mod that sends an e-mail when a new registration is waiting to be moderated?


All times are GMT. The time now is 02:19 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.01224 seconds
  • Memory Usage 1,764KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete