To fix the problem, add this code to MN hook:
Code:
if (!function_exists('vsa_CompareVersions'))
{
function vsa_CompareVersions($verstr1, $verstr2)
{
$ver1 = explode('.', $verstr1);
$ver2 = explode('.', $verstr2);
for($i = 0; $i < 3; $i++)
{
if(intval($ver1[$i]) > intval($ver2[$i]))
return -1;
elseif(intval($ver1[$i]) < intval($ver2[$i]))
return 1;
}
return 0;
}
}
Then instead of
Code:
if ($vbulletin->options['templateversion'] >= '4.1.8')
use this code:
Code:
$templateVerIsOlderThan418 = (vsa_CompareVersions($vbulletin->options['templateversion'], '4.1.8') > 0);
if(!$templateVerIsOlderThan418)