![]() |
| | |||||||
| Notices |
| Tutorials Post all tutorials regarding programming,design or vBulletin here! |
| | Bookmarks | Thread Tools |
| | #1 (permalink) |
| KXDesign Admin |
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: Unregistered users can not view codes.Please register.
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: Unregistered users can not view codes.Please register.
This was a very basic introduction into using PHP conditionals with vBulletin boolean (Yes/No) options
__________________ .::{KXDesign Owner}::. |
| | |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |