MyBB Community Forums

Full Version: new post on site?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
thanks this should help alot
Hmm, try this one, make a file called last10.php

And paste this code

<?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>";
    }

?>

^This script will show the last 10 threads, modify this line .

LIMIT 0,10"

0,5 to show lastest 5 threads.

And also change the http://www.yourforum.com/ to your forum link

Have fun.
yes, i added that, took me a few mins to understand the editing but i got it working, ty so much.
Pages: 1 2