The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
List of IF Conditions
Does anyone know where I can find a list of all of the available <IF> conditions that can be used in vbulletin?
|
#2
|
|||
|
|||
There is no such list. You can use any variable that is defined on that specific script in a condition.
|
#3
|
|||
|
|||
Is it possible to run an IF command so that a plugin only appears IF a certain style is selected by the user?
|
#4
|
|||
|
|||
Why not just make the modifications to the selected style only? That way it will only appear if the user is running that style.
The if condition would look something like this: Code:
<if condition="$bbuserinfo['styleid'] == X"> SOME CODE </if> |
#5
|
|||
|
|||
True, there is no list since anyone can go into a script and define some variables that can be used, but there are a few which I find useful and use quite often, take a look here.
|
#6
|
|||
|
|||
Quote:
Quote:
|
#7
|
|||
|
|||
<if condition="$bbuserinfo['styleid'] == 15">
include('/home/osorg/public_html/include/head.inc.php'); </if> Is this accurate? I put this inside a plugin which is being run at the global_complete hook. I want it to only run if the user's style is set to ID 15. It doesn't seem to be working. Any suggestions? |
#8
|
||||
|
||||
You need to put php in hooks, what you have there is template 'code'.
|
#9
|
||||
|
||||
Code:
if ($vbulletin->userinfo['styleid'] == '15') { include(DIR . '/home/osorg/public_html/include/head.inc.php'); } |
#10
|
|||
|
|||
Worked great, thank you!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|