I was hoping to get this great mod working in my 4.1.5 but ran into an issue.
I followed the instructions from the readme.txt.
Below is the error I got and also how my forumdisplay.php looks.
What could be wrong?
Thanks for any help
PHP Code:
Database error:
Database error in vBulletin 4.1.5:
Invalid SQL:
SELECT COUNT(*) AS threads
FROM thread AS thread
/*
WHERE thread.forumid = 198
AND sticky = 0
AND visible IN (0,1,2);
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*
WHERE thread.forumid = 198
AND sticky = 0
AND visible IN (0,1,2)' at line 9
Error Number : 1064
Request Date : Saturday, December 3rd 2011 @ 10:53:10 AM
Error Date : Saturday, December 3rd 2011 @ 10:53:10 AM
and my forumdisplay.php:
PHP Code:
$hook_query_fields = $hook_query_joins = $hook_query_where = '';
($hook = vBulletinHook::fetch_hook('forumdisplay_query_threadscount')) ? eval($hook) : false;
# Include visible IN (0,1,2) in order to hit upon the 4 column index
$threadscount = $db->query_first_slave("
SELECT COUNT(*) AS threads
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE thread.forumid = $foruminfo[forumid]
AND sticky = 0
$prefix_filter
$visiblethreads
$globalignore
$limitothers
$datecut
");
$totalthreads = $threadscount['threads'];
$threadscount = $db->query_first_slave("
SELECT COUNT(*) AS newthread
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE thread.forumid = $foruminfo[forumid]
AND thread.lastpost > $lastread
AND open <> 10
AND sticky = 0
$prefix_filter
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
");
$newthreads = $threadscount['newthread'];