[vBulletin|PHP]vBulletin options and conditionals
by
24 Dec 2006
Want to bring your new product onto a new level and use vBulletin options as well?Here we go To create a simple on/off option just enter the vBulletin option admincp.Now insert the values for your desired option,when you get to the type sellect boolean.I won't describe the other types here.Boolean returns values true/1 if the condition was correct and false/0 if it wasn't. So the variable for a vb option is $vbulletin->options['OPTIONNAME'] in plugins and php code and for templates use $vboptions[OPTIONNAME] (notice,no apostrophes in templates).So to make a simple condition: PHP Code:
if ($vbulletin->options['OPTIONNAME'])
Oh I forgot,Yes = 1 and No = 0 Did you notice the else?That is executed if the condition is anything else than what we are checking with.But you can extend your code with another elseif PHP Code:
if ($vbulletin->options['OPTIONNAME'] == '1')
|