JamesTalbot
01-18-2009, 01:44 AM
Hello,
Looking to create a custom class called League. This is going to be integrated with vBulletin. I want to use be able to use the $vbulletin->userinfo[]; inside the methods...if that makes sense. Here is what i have.
League.php
class League
{
private $vbulletin;
public function __constructor($vbulletin)
{
global $vbulletin;
}
public function showNews()
{
echo $this->userinfo['username'];
}
}
config.php
$cur_dir = getcwd();
chdir('./forums/');
require_once('./global.php');
chdir($cur_dir);
include ('League.php');
$league = new League($vbulletin);
index.php
include ('config.php');
$league->showNews();
I was hoping that it would display the username but obviously i am doing something very wrong.
How do i create a custom class and be able to use the $vbulletin, $db methods/objects etc?
Sorry for confusing questions. Hope someone can help me with this. :) Thanks.
Looking to create a custom class called League. This is going to be integrated with vBulletin. I want to use be able to use the $vbulletin->userinfo[]; inside the methods...if that makes sense. Here is what i have.
League.php
class League
{
private $vbulletin;
public function __constructor($vbulletin)
{
global $vbulletin;
}
public function showNews()
{
echo $this->userinfo['username'];
}
}
config.php
$cur_dir = getcwd();
chdir('./forums/');
require_once('./global.php');
chdir($cur_dir);
include ('League.php');
$league = new League($vbulletin);
index.php
include ('config.php');
$league->showNews();
I was hoping that it would display the username but obviously i am doing something very wrong.
How do i create a custom class and be able to use the $vbulletin, $db methods/objects etc?
Sorry for confusing questions. Hope someone can help me with this. :) Thanks.