I am getting an error when a user is in coventry and trying to view the forum home or forumdisplay. When I checked the output for the error, it seems to be resulting from code added by a plugin of this hack.
PHP Code:
if ($vbulletin->options['prefixinlastpost'])
{
if ($vbulletin->userinfo['userid'] AND in_coventry($vbulletin->userinfo['userid'], true))
{
$counter_select = str_replace('forum.lastthread, tachyforumpost.lastthread', 'IF(forum.lastthreadprefix <> \'\' AND forum.allowprefix != 0, CONCAT(forum.lastthreadprefix, \' - \', forum.lastthread), forum.lastthread) AS lastthread, IF(tachyforumpost.lastthreadprefix <> \'\' AND forum.allowprefix != 0, CONCAT(tachyforumpost.lastthreadprefix, \' - \', tachyforumpost.lastthread) AS lastthread, tachyforumpost.lastthread)', $counter_select);
}
else
{
$counter_select = str_replace('lastthread,', 'IF(lastthreadprefix <> \'\' AND allowprefix != 0, CONCAT(lastthreadprefix, \' - \', lastthread), lastthread) AS lastthread,', $counter_select);
}
}
It's reading a MySQL 1064 (invalid SQL syntax) error here
PHP Code:
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 'AS lastthread, IF(tachyforumpost.lastthreadprefix <> '' AND forum.allowprefix !=' at line 5
Error Number : 1064
I'm running vBulletin 3.5.4 and the lastest release of this hack, with the change given by Larrysw for 3.5.4 compatability. Any assistance is greatly appreciated, thank you