MyBB Community Forums

Full Version: Why isnt this latest thread code working?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

On my website I have a side bar with the purpose of showing latest threads.

The code below doesnt seem to be working and I cannot get my head around why, any help is much appreciated.

My forum - theonlinegamingzone.com

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}

<div class="sidebar" style="float: right; width: 250px;">

	<script type="text/javascript">
	jQuery(function(){
		jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
	});
	</script>
  
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr>
			<td class="thead">
					<strong>Latest Activity</strong>
			</td>
		</tr>
		<tr>
			<td style="{$collapsed['ths_e']} padding: 0;" id="ths_e">
				<div class="latestthreads float_left"></div>
			</td>
		</tr>
	</table>
  	<div class="theadend"></div>

</div>
  
<div class="forums" style="float: left; width: 724px;">
	{$forums}
</div>
  
<br class="clear" /><br />
{$boardstats}
{$footer}
</body>
</html>
I removed that code in the latest update of Square theme, because the current code take the threads and post from the portal and import them into the index, BUT, it runs all the queries from the portal and that's a innecesary amount of loading when you only need one query.

I recommend to you download the latest update, and install a plugin to show the latest threads.

P.d.: Also, seems like your site is having some problems loading jquery and more things.