[Request] Notification after moderating thread
#11
Look here:
// FROM [ AUTOACCOUNT = DEFAULT UID 1 ]

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

Dr Small
Reply
#12
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
Reply
#13
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.
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#14
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 ...
Reply
#15
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
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#16
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;
******************
Reply
#17
Yeah, I did. The "Replace it after [ Few Lines Up ]" part is what confuses me.
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#18
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.


Attached Files
.php   class_moderation.php (Size: 45.68 KB / Downloads: 186)
Reply
#19
Fatal error: Call to undefined function: update_forum_counters()

class_moderation.php on line 238
Reply
#20
That's a problem with your functions.php =P not class_moderation.php =P
Do you run MyBB 1.2.9 ?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)