MyBB Community Forums

Full Version: Shoutbox AJAX
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
Was asking because it doesn't want to appear. Does it need template modification?
Well, it isn't a standalone shoutbox, but an interface around the Shoutbox of Musicalmidget, and so you have to install that plugin at first.
how i can do what the order of the shouts been ascending???
only works in descending mode Sad
Open inc/plugins/ajax_shoutbox.php and find:
	//Load shouts
	$query = $db->query("SELECT s.*, u.username, u.usergroup, u.displaygroup
	FROM ".TABLE_PREFIX."shouts s
	LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid)
	ORDER BY s.dateline DESC
	LIMIT 0, 5");

Replace with:
	//Count Shouts
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."shouts");
	$count = $db->num_rows($query);
	
	//Define start-point
	if($count < 5)
	{
		$start = 0;
	}
	else
	{
		$start = $count-5;
	}
	
	//Load shouts
	$query = $db->query("SELECT s.*, u.username, u.usergroup, u.displaygroup
	FROM ".TABLE_PREFIX."shouts s
	LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid)
	ORDER BY s.dateline ASC
	LIMIT ".$start.", 5");
Hi

Is it possible to get the ajax shoutbox only on the index page. And it would be nice if somebody could tell me how I can bring it under the forums and over the boardstats. I can't find it.

Thanks, lenkradschloss
(2008-08-04, 12:22 PM)lenkradschloss Wrote: [ -> ]Is it possible to get the ajax shoutbox only on the index page.

Yeah, just go into Shoutbox Options under settings, scroll to the bottom, set show on pages to yes, then type 'index.php' in the textbox below, quotes excluded.
Yes, like I said in the first post, it is possible.
Just look in the settings of the Shoutbox:
[Image: attachment.php?aid=550]

Set the first setting you see in the attachment to "yes", and the second to "index.php".

EDIT: G405T was before me.
does this have smilies, fonts and colors?
@indigored: Yes, you can allow MyCode and Smilies, works fine, but there is no dropdown menu like when you post a new reply.

@Paretje/Musicalmidget: Is it possible to "edit/delete" shouts. Or can you please add something like that.

@Paretje: 1. Please tell me how I can get the ajax shoutbox between the forums and the stats.
2. If I choose display mode "Both Window and Index" only the shoutbox on the index is with ajax, the one with the seperate window is the "old" one. ;-)

Thanks & Greets, lenkradschloss
(2008-08-04, 10:11 PM)lenkradschloss Wrote: [ -> ]@Paretje/Musicalmidget: Is it possible to "edit/delete" shouts. Or can you please add something like that.

@Paretje: 1. Please tell me how I can get the ajax shoutbox between the forums and the stats.
2. If I choose display mode "Both Window and Index" only the shoutbox on the index is with ajax, the one with the seperate window is the "old" one. ;-)

Thanks & Greets, lenkradschloss

0. When you click on the header title of the AJAX Shoutbox, or when you click on Shoutbox in the welcome barn you get the shoutbox popup where you can edit and delete the shouts Wink

1. First: the HTML comments has to be on for this change Wink
Open inc/plugin/shoutbox_ajax.php and find:
		preg_match('#'.preg_quote("<div id=\"content\">").'#i', $page, $matches);
		if($matches[0])
		{
			$page = str_replace($matches[0], "<div id=\"content\">\n".$shoutbox_ajax, $page);
		}

Replace with:
		preg_match('#'.preg_quote("<!-- end: forumbit_depth1_cat -->").'#i', $page, $matches);
		if($matches[0])
		{
			$page = str_replace($matches[0], "<!-- end: forumbit_depth1_cat -->\n".$shoutbox_ajax, $page);
		}

2. Both Window and Index is the mode of the Shoutbox of Musicalmidget, this plugin only delivers a AJAX interface around that system. That setting has no effect to the AJAX SHoutbox
Pages: 1 2 3 4 5 6 7 8 9 10