MyBB Community Forums
[Request] Notification after moderating thread - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Requests (https://community.mybb.com/forum-65.html)
+---- Thread: [Request] Notification after moderating thread (/thread-21476.html)

Pages: 1 2 3 4 5


RE: [Request] Notification after moderating thread - Dr Small - 2007-07-28

Look here:
// FROM [ AUTOACCOUNT = DEFAULT UID 1 ]

$from = $mybb->user['uid'];

Dr Small


RE: [Request] Notification after moderating thread - LeX- - 2007-07-28

tristan/SMM Wrote:Hey LeX-

Is the PM sent by the person that was responsible for the moderation? Or is it always sent by uid 1?

First i used 1 , but then i changed it into the uid of the person who does the moderation =P


RE: [Request] Notification after moderating thread - tristan/SMM - 2007-07-28

Hey LeX-,

I tried this plugin out by having a test account make a post, and then going into my account and deleting it. The test user wasn't notified.


RE: [Request] Notification after moderating thread - LeX- - 2007-07-28

Did you replace all the hooks ? Cause the delete_thread hook isn't at the right place ... And also, me and another person can confirm that the plugin works ...


RE: [Request] Notification after moderating thread - tristan/SMM - 2007-07-28

Oh, crap. I forgot to replace the hooks.

* tristan/SMM hits himself over the head

Erm.... LeX-? This is an embarrassingly stupid question.... but how would I replace the hooks? What exactly am I supposed to do? Try to explain it to me like you would to a 5 year old, because that's my level of knowledge when it comes to these things. Rolleyes


RE: [Request] Notification after moderating thread - LeX- - 2007-07-28

Did you read "notes_plugin.txt" ?

Note Plugin ::

Open class_moderation.php

Find
*****************
$plugins->run_hooks("class_moderation_delete_post", $post['pid']);
*****************

Replace it after [ Few Lines Up ]
*****************
$post = $db->fetch_array($query);
*****************


*******************************************************************

Find
******************
$plugins->run_hooks("class_moderation_delete_thread", $tid);
******************

Replace it after [ Few Lines Up ]
******************
$thread = $db->fetch_array($query);
******************


*******************************************************************

Find
******************
$plugins->run_hooks("class_moderation_merge_posts", array("pids" => $pids, "tid" => $tid));
******************

Replace it after [ Few Lines Up ]
******************
$pidin = implode(",", $pids);
******************


*******************************************************************

Find
******************
$plugins->run_hooks("class_moderation_merge_threads", array("mergetid" => $tid, "tid" => $tid, "subject" => $subject));
******************

Replace it after [ Few Lines Up ]
******************
$pollsql['subject'] = $subject;
******************



RE: [Request] Notification after moderating thread - tristan/SMM - 2007-07-28

Yeah, I did. The "Replace it after [ Few Lines Up ]" part is what confuses me.


RE: [Request] Notification after moderating thread - LeX- - 2007-07-28

tristan/SMM Wrote:Yeah, I did. The "Replace it after [ Few Lines Up ]" part is what confuses me.

Just place the "hook" after the specified line ... =/ =P But here's my class_moderation.php, with every hook at the right place.


RE: [Request] Notification after moderating thread - haXan2005 - 2007-07-28

Fatal error: Call to undefined function: update_forum_counters()

class_moderation.php on line 238


RE: [Request] Notification after moderating thread - LeX- - 2007-07-28

That's a problem with your functions.php =P not class_moderation.php =P
Do you run MyBB 1.2.9 ?