MyBB Community Forums

Full Version: Intergration not working with numbers.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there.

So I've been making a website for my software company lately, as I've decided I want MyBB as the forums only. I'm working on the actual main page etc now. I see to be having a problem with the intergration. I've been able to get login intergration working, but not post counts etc.

Here is my code:
<div class="welcometxt">
	<br />
	<?php
    echo "We have ".$mybb->stats['numusers']."posts, <br />";
	echo "In ".$mybb->stats['numposts']."threads, <br />";
	echo "By ".$mybb->stats['numusers']."members. <br />";
	?>
<br />
				<?php
if($mybb->user['uid'])
{
    // If the user if logged in, display a welcoming message.
    echo "Welcome back ".$mybb->user['username']."!<br />";
	echo "You have ".$mybb->user['postnum']." posts.<br />";
}
else
{
    // If the user is not logged in, display the login form.
    echo "<form action='/member.php' method='post'>";
    echo "<input type='hidden' name='action' value='do_login' />";
    echo "<input type='hidden' name='url' value='../index.php' />";
    echo "Username: <input type='text' name='username' maxlength='30' /><br />";
    echo "Password: <input type='password' name='password' /><br />";
    echo "<input type='submit' name='submit' value='Login' />";
    echo "</form>";
	echo "Don't have an account? Why not Register?";
}

?>

	</div>

As you can see it has log in and supposed to have posts threads / members too. Smile

But, for some strange reason the NumPosts, NumThreads and NumUsers isn't working. It just doesn't show up as anything.

Demo:
http://dotrb.net/beta

Thanks.
No one can help?