MyBB Community Forums

Full Version: [AJAX] Inferno Shoutbox for MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2016-05-17, 03:19 PM)Edward10432 Wrote: [ -> ]How do you add clickable links as notices when i try adding one it does this

[Image: d2b7020aab.png]

Try to use mycode to replace any HTML markup in notices.

[url=http://google.com]Example[/url]
(2016-04-06, 01:52 PM)Clank Wrote: [ -> ]In inferno.php replace
function inferno_newthread()
{
	global $mybb, $db, $settings, $url, $lang, $tid;
	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'])))
		{
			$link = '[url=' . $settings['bburl'] . '/' . get_thread_link($tid) . ']' . $db->escape_string($data['subject']) . '[/url]';
			$shout = $lang->sprintf($lang->isb_newthread, $link);
			$inferno->create_shout($mybb->user['uid'], $shout, true);
		}
	}
}
with

function inferno_newthread()
{
	global $mybb, $db, $settings, $url, $lang, $tid, $visible, $new_thread;

	if ($settings['inferno_enabled'])
	{
		$inferno = inferno_init();
		$data = $mybb->input;
		$fid = $data['fid'];
		if ($visible && !$new_thread['savedraft']) 
		{
			if ($settings['inferno_thread_post'] && !in_array($fid, explode(',', $settings['inferno_thread_forums'])))
			{
				$link = '[url=' . $settings['bburl'] . '/' . get_thread_link($tid) . ']' . $db->escape_string($data['subject']) . '[/url]';
				$shout = $lang->sprintf($lang->isb_newthread, $link);
				$inferno->create_shout($mybb->user['uid'], $shout, true);
			}
		}
	}
}

EDIT: Sorry about that, this only works for the new thread. I was in a rush this morning and didn't read far enough. I'll work on the new post when I have time, maybe late tonight, probably tomorrow.
EDIT 2: Okay, I'm back and here's the code to fix the posts
Replace
function inferno_newpost()
{
	global $mybb, $db, $settings, $post, $url, $lang, $thread;
	$counter = (int) $settings['inferno_newpost'];
	$posts = (int) $mybb->user['postnum'] + 1;


	if ($settings['inferno_enabled'] && $counter)
	{
		$inferno = inferno_init();
	
		if ($posts % $counter == 0)
		{
			$inferno->create_shout($mybb->user['uid'], $lang->sprintf($lang->isb_newpost, $posts), true);
		}
	}
	

	if ($settings['inferno_enabled'])
	{
		$inferno = inferno_init();
		$data = $mybb->input;
		$fid = $thread['fid'];
		$inferno_url = htmlspecialchars_decode($url);

		if ($settings['inferno_post_post'] && !in_array($fid, explode(',', $settings['inferno_thread_forums'])))
		{
			$link = '[url=' . $settings['bburl'] . '/' . $inferno_url . ']' . $db->escape_string($thread['subject']) . '[/url]';
			$shout = $lang->sprintf($lang->isb_newpost_shout, $link);
			$inferno->create_shout($mybb->user['uid'], $shout, true);
		}
	}
}
with
function inferno_newpost()
{
	global $mybb, $db, $settings, $post, $url, $lang, $thread, $visible;
	$counter = (int) $settings['inferno_newpost'];
	$posts = (int) $mybb->user['postnum'] + 1;

	if ($visible == 1) {
		if ($settings['inferno_enabled'] && $counter)
		{
			$inferno = inferno_init();
	
			if ($posts % $counter == 0)
			{
				$inferno->create_shout($mybb->user['uid'], $lang->sprintf($lang->isb_newpost, $posts), true);
			}
		}
	

		if ($settings['inferno_enabled'])
		{
			$inferno = inferno_init();
			$data = $mybb->input;
			$fid = $thread['fid'];
			$inferno_url = htmlspecialchars_decode($url);

			if ($settings['inferno_post_post'] && !in_array($fid, explode(',', $settings['inferno_thread_forums'])))
			{
				$link = '[url=' . $settings['bburl'] . '/' . $inferno_url . ']' . $db->escape_string($thread['subject']) . '[/url]';
				$shout = $lang->sprintf($lang->isb_newpost_shout, $link);
				$inferno->create_shout($mybb->user['uid'], $shout, true);
			}
		}
	}
}
Both are in inferno.php. I also updated the code on the github page, so if you download it from there, it will have this.

Downloaded the new php to be safe. Works like a charm, we are no longer getting shouts for draft posts/threads. Thanks very much.
Hello, is there a way to:

1) Reset all users settings to defaults (fonts, colours etc.)
2) Erase shouts archive

Thanks!
(2016-10-19, 05:53 PM)rootsrat Wrote: [ -> ]Hello, is there a way to:

1) Reset all users settings to defaults (fonts, colours etc.)
2) Erase shouts archive

Thanks!

The easiest way would be to uninstall and reinstall the shoutbox, or to manually edit the tables

You can delete all the shouts with the /purge command however
Reinstalling didn't work unfortunately, I tried that before posting here. All the settings for individual users were retained. No biggie, I can live with that.

As for the purge, I found the command, it's actually /prune Smile
anyway to move the text bar to the bottom?
can't add shout
becouse it's only show loading..
how can fix this error
help me 
thanks
Hello,

we are using the Shoutbox but it is not scrolled completely to the bottom.

When i refresh the page, it is "Loading...", then the shouts are displayed starting at the bottom
and then it instantly jumps up 2 - 3 rows.

How could i fix that, i searched already but did not find the code, where i could scroll to the bottom.

I hope you can help me.
Is it possible to make the Shoutbox Notice fixed? so members can see the Shoutbox Notice even if they scroll down?
This is an awesome Shoutbox. And from reading there is great support.

I was wondering if there was a way to make this responsive to mobile devices?