After that you can work with vb's superobject using $GLOBALS['vbulletin'] variable. You mentioned 2 problems - last posts and authentification. OK... To get last posts you can use something like that:
PHP Code:
function get_posts($threadid)
{
$posts = array();
$query = $vbulletin->db->query_read("SELECT * FROM post ORDER BY dateline DESC LIMIT 10");
while($post = $vbulletin->db->fetch_array($query)) $posts[] = $post;
return $posts;
}
Where $vbulletin is vb's superobject.
And now about users. Look at $vbulletin->userinfo property, it contains information about logged user.