OP 24 October, 2021 - 10:43 PM
Did this a long time ago, dm me for credit! :))
Add this hook in the dvz_shoutbox.php plugin file:
$plugins->add_hook('newthread_do_newthread_end', "NEWTHREAD_BROADCAST");
Then add this function under the dvz_shoutbox_info() function:function NEWTHREAD_BROADCAST() { global $db, $mybb, $tid; $GET_THREAD_INFO = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE tid='$tid'"); $thread_row = $GET_THREAD_INFO->fetch_assoc(); $GET_CATEGORY_INFO = $db->query("SELECT * FROM ".TABLE_PREFIX."forums WHERE fid='".$thread_row['fid']."'"); $category_row = $GET_CATEGORY_INFO->fetch_assoc(); $db->insert_query('dvz_shoutbox', [ 'uid' => intval($thread_row['uid']), 'text' => "New thread [url=".$mybb->settings['bburl']."/showthread.php?tid=$tid]".$thread_row['subject']."[/url] posted in [url=".$mybb->settings['bburl']."/forumdisplay.php?fid=".$thread_row['fid']."]".$category_row['name']."[/url]", 'date' => TIME_NOW, 'ipaddress' => $db->escape_binary( my_inet_pton('127.0.0.1') ), ]); }
Add this hook in the dvz_shoutbox.php plugin file:
$plugins->add_hook('newthread_do_newthread_end', "NEWTHREAD_BROADCAST");
Then add this function under the dvz_shoutbox_info() function:function NEWTHREAD_BROADCAST() { global $db, $mybb, $tid; $GET_THREAD_INFO = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE tid='$tid'"); $thread_row = $GET_THREAD_INFO->fetch_assoc(); $GET_CATEGORY_INFO = $db->query("SELECT * FROM ".TABLE_PREFIX."forums WHERE fid='".$thread_row['fid']."'"); $category_row = $GET_CATEGORY_INFO->fetch_assoc(); $db->insert_query('dvz_shoutbox', [ 'uid' => intval($thread_row['uid']), 'text' => "New thread [url=".$mybb->settings['bburl']."/showthread.php?tid=$tid]".$thread_row['subject']."[/url] posted in [url=".$mybb->settings['bburl']."/forumdisplay.php?fid=".$thread_row['fid']."]".$category_row['name']."[/url]", 'date' => TIME_NOW, 'ipaddress' => $db->escape_binary( my_inet_pton('127.0.0.1') ), ]); }