The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi there,
I've been googling this for a while now but I can't seem to find an explanation on any other site, neither on vbulletin.org. Vbulletin.com support redirected me here since they do not support 3rd party mods / addons. I have coded a small .php file to provide user login on my website(http://www.tfn.gr) pointing towards the http://www.tfn.gr/forum forum. The script all by itself works perfectly, however when I try to port it to my OOP-based framework (CodeIgniter) to include it there i suddently get a lot of errors. Source for simple code: PHP Code:
The odd thing is that what I need is working perfectly in a simple .php script but I can't get it ported without showing errors, and i'm pretty sure that I'm porting properly - went over the code 3 times (and it's not like its thousands of lines). On Vbulletin.org they say that this might be because the code is in a class (object?), however my whole cms is divided in classes. The error that I get when ported to my cms is the following: When user is logged in: Fatal error: Call to a member function query_read_slave() on a non-object in /home2/tfn/public_html/forum/includes/functions.php on line 3189 Anyone has any idea what might be the problem? Regards, Erik |
#2
|
||||
|
||||
![]()
global.php cannot be included in any scope other than global scope. Doing so causes the errors you are seeing.
|
#3
|
||||
|
||||
![]()
Okay...so are you saying that i should include global.php in the initialisation of my whole CMS a.k.a. where all the base classes are constructed, or even before that? Won't that affect performance (as the only thing i'm trying to recreate is a simple login + welcome back $user - area) ?
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|