Quote:
Originally Posted by MarkFL
The plugin uses the hook location "global_start" so it will in fact be executed on every page. The usergroup restriction will determine whether the code within the conditional is executed or not, as determined by the the value returned by the is_member_of() function. If this function returns a true value, it will execute, but if it returns a false value it will not. 
|
The hook is using init_startup (not global). Once I added the conditional, the code stopped executing.
This is the specific code with conditional included I'm talking about
:
HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="blockscript" active="1">
<title>BlockScript vBulletin Integration</title>
<description>BlockScript vBulletin Integration</description>
<version>1.0</version>
<url>http://www.blockscript.com/</url>
<versioncheckurl />
<dependencies />
<codes />
<templates />
<plugins>
<plugin active="1" executionorder="1">
<title>BlockScript vBulletin Integration</title>
<hookname>init_startup</hookname>
<phpcode><![CDATA[if (is_member_of($vbulletin->userinfo, array(1,2,3,4,8,17,19,20,26,15,22,16,14,18,21)))
{
if (file_exists(CWD.'/blockscript/detector.php')) {
include_once(CWD.'/blockscript/detector.php');
} elseif (file_exists(CWD.'/../blockscript/detector.php')) {
include_once(CWD.'/../blockscript/detector.php');
} else {
include_once(CWD.'/../../blockscript/detector.php');
}
}]]></phpcode>
</plugin>
</plugins>
<phrases />
<options />
<helptopics />
<cronentries />
<faqentries />
</product>