MyBB Community Forums

Full Version: Forum Stats on Blog page ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Guys I want to start a wordpress blog for my forum. I want the blog to show active threads going on in my forum in blog's side panel.

Is it possible ? if yes, then how ?

thanks in advance Big Grin
But I didn't get exactly what to do...where I have to create grab.php ? on my forum root ? just reposting here :


for example, make file: grab.php
this is for latest post discussion..
for latest thread, change t.lastpost --> t.tid

<?php
define("IN_MYBB", 1);
require_once "./global.php";

	$query = $db->query("
		SELECT t.*
		FROM ".TABLE_PREFIX."threads t
		ORDER BY t.lastpost DESC 
		LIMIT 0,10"
	);
	while($thread = $db->fetch_array($query))
	{
		$thread['subject'] = htmlspecialchars_uni($thread['subject']);
		$thread['threadlink'] = get_thread_link($thread['tid']);
		echo "<a href=\"http://www.yourforum.com/".$thread['threadlink']."\">".$thread['subject']."</a><br>";
	}

?>
^ yes, you can make that file on the forum root AND use it on a widget at your blog
( you may simply use iframe embed code )