Recent thread

I found this on vb.org hope it helps:

All you need is a query that will read the threads and order them by dateline. Here is a simple example for you:

PHP:
<?php 

chdir(path/to/your/forums); 
require_once('./global.php'); 

$threads = $db->query_read(" 
SELECT title FROM " . TABLE_PREFIX . "thread 
ORDER by dateline DESC 
LIMIT 0,5 
"); 
while ($thread = $db->fetch_array($threads)) 
{ 
echo $thread['title'] . "<br />"; 
} 
?>

The codes above will should show you the recent 5 threads.
 
Back
Top