MyBB Community Forums

Full Version: [Request] Notification after moderating thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Look here:
// FROM [ AUTOACCOUNT = DEFAULT UID 1 ]

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

Dr Small
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
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.
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 ...
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
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;
******************
Yeah, I did. The "Replace it after [ Few Lines Up ]" part is what confuses me.
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.
Fatal error: Call to undefined function: update_forum_counters()

class_moderation.php on line 238
That's a problem with your functions.php =P not class_moderation.php =P
Do you run MyBB 1.2.9 ?
Pages: 1 2 3 4 5