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-02-21, 01:23 AM)ectomatt Wrote: [ -> ]
(2016-02-21, 01:19 AM)Sgt Cheesepuffs Wrote: [ -> ]/prune doesn't work...

Would you like to take even the slightest amount of effort to be more descriptive or do you think by posting "It doesn't work" it will magically fix itself? Nobody else is having problems.

Sorry, my brain was just numb from school.
Anyway, I set the proper ID for who can admin the shoutbox, but whenever I use /prune, it doesn't delete anything in the shoutbox.
(2016-02-23, 02:53 AM)Sgt Cheesepuffs Wrote: [ -> ]
(2016-02-21, 01:23 AM)ectomatt Wrote: [ -> ]
(2016-02-21, 01:19 AM)Sgt Cheesepuffs Wrote: [ -> ]/prune doesn't work...

Would you like to take even the slightest amount of effort to be more descriptive or do you think by posting "It doesn't work" it will magically fix itself? Nobody else is having problems.

Sorry, my brain was just numb from school.
Anyway, I set the proper ID for who can admin the shoutbox, but whenever I use /prune, it doesn't delete anything in the shoutbox.

It works on my end... Did you change anything on your install?
(2016-02-23, 03:30 AM)Clank Wrote: [ -> ]
(2016-02-23, 02:53 AM)Sgt Cheesepuffs Wrote: [ -> ]
(2016-02-21, 01:23 AM)ectomatt Wrote: [ -> ]
(2016-02-21, 01:19 AM)Sgt Cheesepuffs Wrote: [ -> ]/prune doesn't work...

Would you like to take even the slightest amount of effort to be more descriptive or do you think by posting "It doesn't work" it will magically fix itself? Nobody else is having problems.

Sorry, my brain was just numb from school.
Anyway, I set the proper ID for who can admin the shoutbox, but whenever I use /prune, it doesn't delete anything in the shoutbox.

It works on my end... Did you change anything on your install?

Not that I know of
(2016-02-23, 03:45 AM)Sgt Cheesepuffs Wrote: [ -> ]
(2016-02-23, 03:30 AM)Clank Wrote: [ -> ]
(2016-02-23, 02:53 AM)Sgt Cheesepuffs Wrote: [ -> ]
(2016-02-21, 01:23 AM)ectomatt Wrote: [ -> ]
(2016-02-21, 01:19 AM)Sgt Cheesepuffs Wrote: [ -> ]/prune doesn't work...

Would you like to take even the slightest amount of effort to be more descriptive or do you think by posting "It doesn't work" it will magically fix itself? Nobody else is having problems.

Sorry, my brain was just numb from school.
Anyway, I set the proper ID for who can admin the shoutbox, but whenever I use /prune, it doesn't delete anything in the shoutbox.

It works on my end... Did you change anything on your install?

Not that I know of

Then I need to know what's different. Since it works on my end, and I have no idea what's different on yours that is causing this issue, I can't do much.
(2016-02-23, 04:47 AM)Clank Wrote: [ -> ]
(2016-02-23, 03:45 AM)Sgt Cheesepuffs Wrote: [ -> ]
(2016-02-23, 03:30 AM)Clank Wrote: [ -> ]
(2016-02-23, 02:53 AM)Sgt Cheesepuffs Wrote: [ -> ]
(2016-02-21, 01:23 AM)ectomatt Wrote: [ -> ]Would you like to take even the slightest amount of effort to be more descriptive or do you think by posting "It doesn't work" it will magically fix itself? Nobody else is having problems.

Sorry, my brain was just numb from school.
Anyway, I set the proper ID for who can admin the shoutbox, but whenever I use /prune, it doesn't delete anything in the shoutbox.

It works on my end... Did you change anything on your install?

Not that I know of

Then I need to know what's different. Since it works on my end, and I have no idea what's different on yours that is causing this issue, I can't do much.

Can't you just fix it though? It's broken
Okay this might be an insane question.

But can I use the javascript used in this shoutbox, and pair it with the css / buttons from the Miuna shoutbox?

I really enjoy both, just the owner of miuna seems to not like to fix exploits.

thank you

~Vanissery
(2016-02-28, 02:32 AM)Vanissery Wrote: [ -> ]Okay this might be an insane question.

But can I use the javascript used in this shoutbox, and pair it with the css / buttons from the Miuna shoutbox?

I really enjoy both, just the owner of miuna seems to not like to fix exploits.

thank you

~Vanissery

You won't be able to mix the javascript from this shoutbox with others because they are programmed inherently different. If I understand what you're asking for, you want the Inferno shoutbox but have the style of the other shoutbox? That just means you need to spend some time with CSS and learn how to style it yourself if you want it to appear differently. Any support we give is going to be for general problems or fixes, not for style preferences. CSS is easy to learn for yourself.
(2016-02-28, 02:45 AM)ectomatt Wrote: [ -> ]
(2016-02-28, 02:32 AM)Vanissery Wrote: [ -> ]Okay this might be an insane question.

But can I use the javascript used in this shoutbox, and pair it with the css / buttons from the Miuna shoutbox?

I really enjoy both, just the owner of miuna seems to not like to fix exploits.

thank you

~Vanissery

You won't be able to mix the javascript from this shoutbox with others because they are programmed inherently different. If I understand what you're asking for, you want the Inferno shoutbox but have the style of the other shoutbox? That just means you need to spend some time with CSS and learn how to style it yourself if you want it to appear differently. Any support we give is going to be for general problems or fixes, not for style preferences. CSS is easy to learn for yourself.

ah.

My problem wasn't mainly the CSS, it was also that I would like to have features in Miuna as well as Inferno.

Thanks though
Hi Ectomatt, is there a way to stop a shout being posted when a member saves a draft of a thread/post? I have the new thread and new post feature on but drafts pop into the shoutbox as well.

Thanks.
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.