The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How to use "if" condition?
I have a plugin that inserts PHP code on all pages to check a user's IP address. What I want to do exclude it from checking administrator's IPs.
The plugin looks like this: HTML Code:
<dependencies /> <codes /> <templates /> <plugins> <plugin active="1" executionorder="1"> <title>BlockScript vBulletin Integration</title> <hookname>init_startup</hookname> <phpcode><![CDATA[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> <vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,8,17,19,20,26,15,22,16,14,18,21)"> But if I insert that in the xml file when adding the product/plugin it gives me a mysql error and doesn't work. Any ideas? Thank you! -Jennifer |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|