PDA

View Full Version : Using vbulletin class within own function.


pero
04-21-2006, 11:43 AM
Hi,

I want to use the classes of vB within my own functions after including global.php.

<?
<?PHP
// include vbulletin functions

chdir('./community');

require_once('./global.php');

function checkLogin (){
if($vbulletin->userinfo['userid'] > 0){
return true;
}
else{
return false;
}
}
?>

This doesn't seem to work. Does anyone know how I can use the vbulletin class within this function?

Found out that I had to use:

global $vbulletin; within the function. Is this save to do?