2016-07-24, 09:14 AM
Hello everyone. I am in the process of creating a plugin that enable moderator new functionality - similar to Open / Close Thread & Stick / Unstick Thread. I manage to create a new option in Moderation Option via find_replace_templatesets(). However I do not know how to proceed after that.
I want a page similar to this when my custom option is selected.
https://i.imgur.com/VpmiYn9.png
I looked into moderation.php and found codes like case "multisoftdeleteposts": and case "do_deletethread": etc. And I guess I will need to create a case for my option value. However, I can't seem to find any hooks in moderation.php that allow me to do that.
I also found $custommod = new CustomModeration; which I feel is something related to what I am trying. I checked the database and find mybb_modtools table. After some research I also found this function mybb_modtools which I do not know how to use.
How can I make a new moderation option? Helps will be appreciated.
Edited: After looking at moderation.php, I found the function I need - moderation_redirect(). Now, how do I set the first parameter (url) to last thread visited? I tried get_thread_link($tid) but it is not working.
Edited: So what I need is $tid = $mybb->get_input('tid', MyBB::INPUT_INT);. Everything is okay now. Thanks to those who tried helping.
I want a page similar to this when my custom option is selected.
https://i.imgur.com/VpmiYn9.png
I looked into moderation.php and found codes like case "multisoftdeleteposts": and case "do_deletethread": etc. And I guess I will need to create a case for my option value. However, I can't seem to find any hooks in moderation.php that allow me to do that.
I also found $custommod = new CustomModeration; which I feel is something related to what I am trying. I checked the database and find mybb_modtools table. After some research I also found this function mybb_modtools which I do not know how to use.
How can I make a new moderation option? Helps will be appreciated.
Edited: After looking at moderation.php, I found the function I need - moderation_redirect(). Now, how do I set the first parameter (url) to last thread visited? I tried get_thread_link($tid) but it is not working.
Edited: So what I need is $tid = $mybb->get_input('tid', MyBB::INPUT_INT);. Everything is okay now. Thanks to those who tried helping.