PDA

View Full Version : Making a boolean variable


Samael
Fri 8th Sep '06, 3:53am
I wish to make a boolean variable in php which will be referenced in the style-sheet for the usercp, this variable will basically display a HTML tag-board when variable = true, and not display it if it = false.

I would like to know where I must create this variable in order for it to work from the usercp, and what it would look like.

Thanks

nico_swd
Tue 26th Sep '06, 7:40pm
Add this somewhere at the top of the script, somewhere after including global.php. If it's outside all if() conditions, it should be accessable no matter what.


$vbulletin->input->clean_gpc('r', array(
'your_var' => TYPE_BOOL
));


To access the variable, use this.

$vbulletin->GPC['your_var'];