Postbit模板包含一个线程的所有信息,在你的情况下,它听起来像你应该得到的threadbit信息。你需要做的是看看forumdisplay.php,看看它是如何获得threadbit的。 然后在你的news.php,你想要做这样的事情:
require_once(DIR . '/includes/functions_forumdisplay.php');
$threads = $db->query_read_slave (sql query, depends on what you need);
$threadbits;
while ($thread = $db->fetch_array($threads)) {
// this method is from the functions_forumdisplay.php
$threadbits .= process_thread_array($thread);
}
$templater = vB_Template::create('adv_portal_newsbits');
$templater->register('threadbits', $threadbits);
print_output($templater->render());
现在,在您adv_portal_newsbits模板,你可以拨打{动:生threadbits}。请注意,threadbits是一个包含所有适合您查询的线程的数组,但您可以使用{vb:each}