PDA

View Full Version : Using Conditionals...


drumforum
07-29-2005, 06:28 PM
Is there a list of conditionals made for VBsomewhere?

Thanks

Adam

sabret00the
08-01-2005, 08:27 AM
what do you mean?

you mean a list of the functions available for us?

drumforum
08-07-2005, 10:31 PM
what do you mean?

you mean a list of the functions available for us?

indeed

Marco van Herwaarden
08-08-2005, 03:24 AM
Are you talking about conditionals/functions to use in templates, or in php-files?

sabret00the
08-08-2005, 09:38 AM
to use in templates i'd assume marco.

// built-in variable checking functions
'in_array', // used for checking
'is_array', // used for checking
'is_numeric', // used for checking
'isset', // used for checking
'empty', // used for checking
'defined', // used for checking
'array', // used for checking

// vBulletin-defined functions
'can_moderate', // obvious one
'can_moderate_calendar', // another obvious one
'exec_switch_bg', // harmless function that we use sometimes
'is_browser', // function to detect browser and versions
'is_member_of', // function to check if $user is member of $usergroupid

Boofo
08-08-2005, 11:04 AM
Ahhh, but the is_member_of doesn't work right with $bbuserinfo. ;)

Colin F
08-08-2005, 12:03 PM
Ahhh, but the is_member_of doesn't work right with $bbuserinfo. ;)

I think that was fixed in 3.5 something.

Boofo
08-08-2005, 12:43 PM
I think that was fixed in 3.5 something.

It didn't work for me on RC 1. ;)

Brad
08-08-2005, 12:50 PM
Ahhh, but the is_member_of doesn't work right with $bbuserinfo. ;)

Try $vbulletin->userinfo, thats what $bbuserinfo was changed to in the 3.5 series :)

Boofo
08-08-2005, 01:20 PM
I tried that also but couldn't get it to work right. I'll try it again, maybe I messed something up (hard to believe, I know). ;)

drumforum
08-10-2005, 05:21 PM
Thanks guys! =]