[Request] Notification after moderating thread
#1
Sometimes users aren't glad when their topics or posts are moved or deleted, merged or splited and they don't know that.
It's possible to create plugin for users PM or e-mail notification when their threads have been moderated?
Reply
#2
Ooh! I like this idea!

Here's how I can see it working..... Post edits getting notification is kind of excessive in my book, but post deletions, as well as thread actions are probably ok.

An automated PM from whoever was responsible for the action would be great.
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#3
With the new hooks in class_moderation.php this can't be difficult, the only thing there is ... there are many hooks ^^

***************************************************
DONE
***************************************************
// CLOSE THREAD
$plugins->run_hooks("class_moderation_close_threads", $tids);
// OPEN THREAD
$plugins->run_hooks("class_moderation_open_threads", $tids);
// DELETE THREAD
$plugins->run_hooks("class_moderation_delete_thread", $tid);
// DELETE POLL
$plugins->run_hooks("class_moderation_delete_poll", $pid);
// DELETE POST
$plugins->run_hooks("class_moderation_delete_post", $post['pid']);
// MERGE POSTS
$plugins->run_hooks("class_moderation_merge_posts", array("pids" => $pids, "tid" => $tid));
// COPY THREAD
$plugins->run_hooks("class_moderation_copy_thread", array("tid" => $tid, "new_fid" => $new_fid));
// MOVE THREAD
$plugins->run_hooks("class_moderation_move_simple", array("tid" => $tid, "new_fid" => $new_fid));
// MOVE THREADS
$plugins->run_hooks("class_moderation_move_threads", array("tids" => $tids, "moveto" => $moveto));
// MERGE THREADS
$plugins->run_hooks("class_moderation_merge_threads", array("mergetid" => $tid, "tid" => $tid, "subject" => $subject));
// SPLIT POSTS
$plugins->run_hooks("class_moderation_split_posts", array("pids" => $pids, "tid" => $tid, "moveto" => $moveto, "newsubject" => $newsubject, "destination_tid" => $destination_tid));
***************************************************
In case anyone wants to start with it =P I have no time at this moment Wink

Edit ::

Found a lil' bit of time =P The first two are nearly done, just need to compose the PM "message" with usefull info Wink Now dinnertime ; the rest will be for this afternoon/evening or maybe tomorrow =P

Edit 2 ::

I aint gonna do them all; like the sticky/unsticky aren't necessary i suppose? =P Just the main ones, open/close ; merge/split ; move thread/move post.

Edit 3 ::

All Done =P Just going to run through my code several times for finding possible glitches =P
Reply
#4
Thanks LeX-. However, one thing I'd really appreciate you doing..... A lot of plugins sending automatic PMs don't update the PM count in the db (or something like that) and because of that, when I user receives an automated PM, he/she is not notified. (Labrocca's donation feature in his MYPS plugin, as well as the notification sent by Smethead's Forum Warning System are perfect examples of this issue) If you could please make sure that this is not as issue with this plugin that you may be working on, it'd be greatly appreciated.


Thanks for your consideration,
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#5
tristan/SMM Wrote:Thanks LeX-. However, one thing I'd really appreciate you doing..... A lot of plugins sending automatic PMs don't update the PM count in the db (or something like that) and because of that, when I user receives an automated PM, he/she is not notified. (Labrocca's donation feature in his MYPS plugin, as well as the notification sent by Smethead's Forum Warning System are perfect examples of this issue) If you could please make sure that this is not as issue with this plugin that you may be working on, it'd be greatly appreciated.


Thanks for your consideration,

I'm aware of that, but my plugin will update the pm count auto. =P
update_pm_count($uid, 7) is present =P

Edit ::

All the hooks, that are in the list in my above post, are done =P Now == testing everything several times in different ways Wink
Reply
#6
LeX- Wrote:
tristan/SMM Wrote:Thanks LeX-. However, one thing I'd really appreciate you doing..... A lot of plugins sending automatic PMs don't update the PM count in the db (or something like that) and because of that, when I user receives an automated PM, he/she is not notified. (Labrocca's donation feature in his MYPS plugin, as well as the notification sent by Smethead's Forum Warning System are perfect examples of this issue) If you could please make sure that this is not as issue with this plugin that you may be working on, it'd be greatly appreciated.


Thanks for your consideration,

I'm aware of that, but my plugin will update the pm count auto. =P
update_pm_count($uid, 7) is present =P

Glad to hear it =)
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#7
tristan/SMM Wrote:Thanks LeX-. However, one thing I'd really appreciate you doing..... A lot of plugins sending automatic PMs don't update the PM count in the db (or something like that) and because of that, when I user receives an automated PM, he/she is not notified. (Labrocca's donation feature in his MYPS plugin, as well as the notification sent by Smethead's Forum Warning System are perfect examples of this issue) If you could please make sure that this is not as issue with this plugin that you may be working on, it'd be greatly appreciated.


Thanks for your consideration,

I thought we fixed the update_thread_count on myps? There really does need to be a nice solid PM function that does it all. When I was working on the PM notification it was rather complex.

hey I double checked and that was fixed...
Reply
#8
labrocca Wrote:
tristan/SMM Wrote:Thanks LeX-. However, one thing I'd really appreciate you doing..... A lot of plugins sending automatic PMs don't update the PM count in the db (or something like that) and because of that, when I user receives an automated PM, he/she is not notified. (Labrocca's donation feature in his MYPS plugin, as well as the notification sent by Smethead's Forum Warning System are perfect examples of this issue) If you could please make sure that this is not as issue with this plugin that you may be working on, it'd be greatly appreciated.


Thanks for your consideration,
hey I double checked and that was fixed...

You're right, it was. My mistake, Labrocca. Rolleyes
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply
#9
Well didn't do much testing with it =P Had other things to do last night. If anyone wants to test the beta of this "plugin" feel free to do =P All "PM-Messages" are pretty standard [ username, what action, link to thread/post if moved/copied/splitted and such ... ] , so if you modify them and the plugin doesn't work properly anymore, well that aint my problem =P

Note :: Use at own risk, i aint responsible for any harm that could have been caused by installing this plugin.

Install ::
* Upload nam.php into your pluginfolder
* And activate in your PluginManager.
* Status [YesNo] Option is located in the "Posting"- Group [ Default YES ]
* Read "notes_plugin.txt" ; Since not all "hooks" are at the correct place to work with this plugin, you need to replace some of the hooks to a better place Wink [ If you don't want to move them by yourself, download the class_moderation.php attached and upload.


Attached Files
.txt   notes_plugin.txt (Size: 1.21 KB / Downloads: 220)
.php   class_moderation.php (Size: 45.68 KB / Downloads: 161)
.php   nam.php (Size: 13.59 KB / Downloads: 160)
Reply
#10
Hey LeX-

Is the PM sent by the person that was responsible for the moderation? Or is it always sent by uid 1?
Tristan
Come talk about school, how to improve it, and just chill out here!
SchoolForums.org
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)