Ah ha! I found the problem. TABLE_PREFIX was missing from get_threads.php. I modified it like so:
Code:
$dataQuery = "SELECT t.*, p.pagetext FROM " . TABLE_PREFIX . "thread t LEFT JOIN "
. TABLE_PREFIX . "post p ON ( p.postid = t.lastpostid ) WHERE t.forumid = "
. $fid . " AND t.open = 1 AND t.visible = 1 ORDER BY t.lastpost DESC LIMIT "
. $offset . "," . $rows;
And also in get_posts.php:
Code:
dataQuery = "SELECT * FROM " . TABLE_PREFIX . "post WHERE ThreadID = " . $threadid . " AND visible = 1 ORDER BY Dateline DESC LIMIT " . $offset . "," . $rows;