Connect your file with the database.
and use this query to get title and threadid from Thread table
Code:
$data = mysql_query("SELECT threadid, title FROM XX_thread WHERE forumid='10' order by threadid desc LIMIT 10")
You can remove forumid='10' from the above query . because above query will get rows of the threads posted in forum ID 10..
After fetching rows. use them to display
PHP Code:
while($news = mysql_fetch_array( $data ))
{
$title = $news['title'];
$thread = $news['threadid'];
$url = $news['title'];
$url = str_replace(' ','-' ,$url);
echo ' <a href="forum/showthread.php/'.$thread.'-'.$url.'" target="_top">'.$title.'</a>';
}
forum/showthread.php/ Because Advanced Friendly URL Type is enabled
thats it.
It will work for vbulletin 4.xx