PHP код:
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="letphplive" active="1">
<title>Let PHP Live!</title>
<description>Allows for PHP execution in vBulletin templates.</description>
<version>1</version>
<url />
<versioncheckurl />
<dependencies>
</dependencies>
<codes>
</codes>
<templates>
</templates>
<plugins>
<plugin active="1" executionorder="0">
<title>Allow PHP</title>
<hookname>template_compile</hookname>
<phpcode><![CDATA[if (!function_exists('let_php_live')) {
function let_php_live($matches) {
$starter = $matches[1] ;
$code = str_replace(array('\'', '\"'), array('\\\'', '"'), $matches[2]) ;
return $starter == '<?=' ? "\".eval('return $code;').\"" : "\".eval('ob_start();$code;return ob_get_clean();').\"" ;
}
}
$template = preg_replace_callback('/(<\?=|<\?php|<\?)(.*)\?>/Us', 'let_php_live', $template);]]></phpcode>
</plugin>
</plugins>
<phrases>
</phrases>
<options>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
</product>
Почему не работает на vBulletin 4.x.x? Что нужно исправить?