The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Variables for conditionals
I am just starting to look at using conditionals, and they look like a simple but powerful tool. However you need to know what variables are available and what they do.
Is this documented anywhere? I've looked through the manual and searched on vbulletin.com and here but can't find anything -- have I missed it? Thanks John |
#2
|
||||
|
||||
It really depeds on what you want to do. There isn't a list of what variable you can use because you can use anything.
|
#3
|
||||
|
||||
As far as I know (which isn't much ), there isn't a list of the variables anywhere. Although a single searchable location of all the variables and what they do would be great.
|
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
OK, how about something really basic
The variables appear to be in two parts eg $bbuserinfo['userid'] there are also $show $post etc Can anyone start by explaining how this works? Thanks John |
#6
|
||||
|
||||
Quote:
$bbuserinfo is a variable array: A variable that can hold multiple values, as opposed to a standard variable that holds only one value. 'userid' is one value in the $bbuserinfo array that is only set if the user is a registered member. So basically "if $bbuserinfo['userid']" is equivelant to saying, "Is the 'userid' value in the $bbuserinfo array set? If yes, then the user is registered". To the best of my knowledge there is no one location where all the standard conditionals are documented here. One developer said it's because there are dozens of variable arrays with hundreds of values each, and as such making a list is just too time consuming for anyone to get to it right now. Or something. |
#7
|
||||
|
||||
Quote:
$bbuserinfo $vboptions $stylevar Are the 3 globals that i am aware about besides $GLOBAL $bbuserinfo can show anything that is stored in the usertable field for the specific person who is online: IE $bbuserinfo[posts] will show the amount of posts, $bbuserinfo[username] will show a users, username. $vboptions are all the options that are stored in the settings table like to show DHTML or the name of your board or even your bulletin boards url $vboptions[bburl] $vboptions[homeurl] $stylevar holds all the non css style settings, like the image directorys. The problem with the documentation is there are so many vairbles that are possible for all thoughs said templates its hard to just document them. |
#8
|
|||
|
|||
A comprehensive list of $vboptions and $stylevar would be dandy.
|
#9
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|