Quote:
Originally Posted by Dismounted
"global" is not a hook. I suggest you do it via the Admin CP.
|
I know I replaced that in my script because I couldn't get memberinfo_start to work, but then I looked again and it was member_start haha. I'll give it a shot again thanks.
Edit:
If conditionals are giving me trouble. Here's the code I am using, but it keeps replacing it even if they aren't banned.
Code:
<plugin active="1" executionorder="1" product="vbulletin">
<title><![CDATA[Ban Home Page1]]></title>
<hookname>member_start</hookname>
<phpcode><![CDATA[
if ($vbulletin->options['banhome_enabled'])
{
$find = '<!-- Ban Home Begin -->';
$replace = '<if condition=\"is_member_of($userinfo, 8)\">Home Page Removed<else />';
$vbulletin->templatecache['memberinfo_block_contactinfo'] = str_replace($find, $replace . $find, $vbulletin->templatecache['memberinfo_block_contactinfo']);
}
]]></phpcode>
</plugin>
<plugin active="1" executionorder="2" product="vbulletin">
<title><![CDATA[Ban Home Page2]]></title>
<hookname>member_start</hookname>
<phpcode><![CDATA[
if ($vbulletin->options['banhome_enabled'])
{
$find = '<!-- Ban Home End -->';
$replace = '</if>';
$vbulletin->templatecache['memberinfo_block_contactinfo'] = str_replace($find, $replace . $find, $vbulletin->templatecache['memberinfo_block_contactinfo']);
}
]]></phpcode>
</plugin>