Razasharp
12-10-2009, 12:02 AM
It gets the latest threads from certain forums, works fine in 3.7 but not 3.8.
hook location - forumhome_start
$threads = $vbulletin->db->query_read("
SELECT threadid, title
FROM " . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1 AND (forumid = '45' OR forumid = '135' OR forumid = '136')
ORDER BY dateline DESC
LIMIT 5
");
$latestthreads = "<ul>\n";
while ($thread = $vbulletin->db->fetch_array($threads))
{
$latestthreads .= ' <li><a href="showthread.php?' . $session['sessionurl'] . 't=' . $thread['threadid'] . '">' . $thread['title'] . '</a></li>
';
}
$latestthreads .= '</ul>';
$vbulletin->db->free_result($threads);
unset($thread);
And then just use $latestthreads in the template to get it.
Any ideas why it doesn't work in 3.8?
hook location - forumhome_start
$threads = $vbulletin->db->query_read("
SELECT threadid, title
FROM " . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1 AND (forumid = '45' OR forumid = '135' OR forumid = '136')
ORDER BY dateline DESC
LIMIT 5
");
$latestthreads = "<ul>\n";
while ($thread = $vbulletin->db->fetch_array($threads))
{
$latestthreads .= ' <li><a href="showthread.php?' . $session['sessionurl'] . 't=' . $thread['threadid'] . '">' . $thread['title'] . '</a></li>
';
}
$latestthreads .= '</ul>';
$vbulletin->db->free_result($threads);
unset($thread);
And then just use $latestthreads in the template to get it.
Any ideas why it doesn't work in 3.8?