-
Notifications
You must be signed in to change notification settings - Fork 2
When thread notification is on, drafts trigger the notification #1
Comments
Forgot to mention that I'm using MyBB 1.6.15, PHP version 5.4.26-pl0-gentoo, and MySQLi 5.5.37. |
Hmm, well this appears to be an issue where Mybb runs the "newthread_do_newthread_end" and the "newthread_end" hooks, even if it was only saved as a draft. I'm not really sure of a way to work around this unless we specifically check if the url is "usercp.php?action=drafts", but I'm not really an expert on Mybb. |
Ah ha! if ($settings['inferno_enabled'])
{
$inferno = inferno_init();
$data = $mybb->input;
$fid = $data['fid'];
if ($settings['inferno_thread_post'] && !in_array($fid, explode(',', $settings['inferno_thread_forums']))) to if ($settings['inferno_enabled'])
{
$inferno = inferno_init();
$data = $mybb->input;
$fid = $data['fid'];
$visible = $data['visible'];
if ($settings['inferno_thread_post'] && $visible > 0 && !in_array($fid, explode(',', $settings['inferno_thread_forums']))) |
That seems to fix the issue. The only problem is that it when you finally post a draft, it doesn't appear in the SB, but that's a pretty minor thing. |
Blargh. I should have tested that more! Apparently, though it does fix drafts not showing up, it also makes it so that no thread announcements are posted! Bwa, back to the drawing board. |
Wait, really? Said code worked fine on my end, aside from what I mentioned before, so I'm not really sure what's going on. Or nevermind... That's really odd though, I was certain I tested it out last night... |
Got it! I'm still using MyBB 1.6, so it's still applicable for me (though the same fix may work for 1.8) global $mybb, $db, $settings, $url, $lang, $tid;
if ($settings['inferno_enabled'])
{
$inferno = inferno_init();
$data = $mybb->input;
$fid = $data['fid'];
$thread = get_thread($tid);
if ($settings['inferno_thread_post'] && $thread['visible'] == 1 && !in_array($fid, explode(',', $settings['inferno_thread_forums']))) |
When someone saves a draft of a post, the notification for it is created in the shoutbox similar to a normal thread. The link directs to /usercp.php?action=drafts.
The text was updated successfully, but these errors were encountered: