vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Variables for conditionals (https://vborg.vbsupport.ru/showthread.php?t=64118)

JohnK 04-19-2004 10:38 PM

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

assassingod 04-19-2004 10:43 PM

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.

SVTBlackLight01 04-19-2004 11:24 PM

As far as I know (which isn't much :D ), 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.

filburt1 04-19-2004 11:42 PM

Quote:

Originally Posted by JohnK
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

I very strongly agree with you that there needs to be a great deal of documentation available on what variables can be used (for example; what keys are in the $post array for postbits, $bbuserinfo everywhere, etc.).

JohnK 04-20-2004 12:13 AM

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

zetetic 06-18-2004 03:28 PM

Quote:

Originally Posted by JohnK
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?

I assume you've figured this out by now, but in case anyone else stumbles on this thread and is wondering the same thing...

$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. :)

Zachery 06-18-2004 03:38 PM

Quote:

Originally Posted by tmhall
I assume you've figured this out by now, but in case anyone else stumbles on this thread and is wondering the same thing...

$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. :)

there are only a speciric ammount of $show varibles and for the most part they are not global

$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.

vbmechanic 06-18-2004 03:40 PM

A comprehensive list of $vboptions and $stylevar would be dandy.

Zachery 06-18-2004 03:42 PM

Quote:

Originally Posted by vbmechanic
A comprehensive list of $vboptions and $stylevar would be dandy.

Ill see about getting a list out for thoughs two later today, :)

zetetic 06-18-2004 03:47 PM

There's a post here that suggests one way of finding out what is stored in a particular array. As mentioned in that thread, though, you'll only see the output relevant to the current user.


All times are GMT. The time now is 11:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02268 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete