The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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 PHP Code:
PHP Code:
PHP Code:
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. ![]() |
#2
|
||||
|
||||
![]()
Firstly, a constructor method is "__construct()". Secondly, "$this" refers to the current object, not another object. Thirdly, you actually need to populate your variables.
![]() PHP Code:
|
#3
|
|||
|
|||
![]()
Thank you so much!!!
![]() |
#4
|
||||
|
||||
![]()
By the way, keep in mind that magic methods (e.g. __construct()) and private/protected/public/static/etc. keywords only exist in PHP 5.
|
#5
|
||||
|
||||
![]()
Don't copy the object, reference it.
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|