almannai
01-11-2010, 05:36 AM
Hi all
Any help will be apriatiated
the following code that is working in vb3 is giving error in vb4
<plugin active="1" executionorder="5">
<hookname>global_start</hookname>
<phpcode><![CDATA[
switch ($vbulletin->options['myplugin_place'])
{
case 1:
$place = '$header';
break;
case 2:
$place = '$navbar';
break;
default:
$place = '$navbar';
break;
}
if ($place == '$navbar'){
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($place, $place . $vbulletin->templatecache['myplugin_template'], $vbulletin->templatecache['FORUMDISPLAY']);
$vbulletin->templatecache['FORUMHOME'] = str_replace($place, $place . $vbulletin->templatecache['myplugin_template'], $vbulletin->templatecache['FORUMHOME']);
}else{
$vbulletin->templatecache['FORUMHOME'] = str_replace($place, $place . $vbulletin->templatecache['myplugin_template'], $vbulletin->templatecache['FORUMHOME']);
}
]]></phpcode>
</plugin>
the error is
Parse error: syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM in class_core.php(3811) : eval()'d code on line 13
So can someone tell me what am doing wrong? Please show some examples to fix it.
Regards,
Any help will be apriatiated
the following code that is working in vb3 is giving error in vb4
<plugin active="1" executionorder="5">
<hookname>global_start</hookname>
<phpcode><![CDATA[
switch ($vbulletin->options['myplugin_place'])
{
case 1:
$place = '$header';
break;
case 2:
$place = '$navbar';
break;
default:
$place = '$navbar';
break;
}
if ($place == '$navbar'){
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($place, $place . $vbulletin->templatecache['myplugin_template'], $vbulletin->templatecache['FORUMDISPLAY']);
$vbulletin->templatecache['FORUMHOME'] = str_replace($place, $place . $vbulletin->templatecache['myplugin_template'], $vbulletin->templatecache['FORUMHOME']);
}else{
$vbulletin->templatecache['FORUMHOME'] = str_replace($place, $place . $vbulletin->templatecache['myplugin_template'], $vbulletin->templatecache['FORUMHOME']);
}
]]></phpcode>
</plugin>
the error is
Parse error: syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM in class_core.php(3811) : eval()'d code on line 13
So can someone tell me what am doing wrong? Please show some examples to fix it.
Regards,