2019-05-29, 06:18 PM
So, I'm trying to build a site, and integrate some MyBB functions into it. However, I'm running into a weird issue.
What I want to do is create an extension for this new site build which pulls in MyBB support. This extension is in a separate directory.
1) If I pull in global.php in this extension directory, I get errors which don't seem to make sense.
2) If I pull in global.php in the root folder, it seems to work fine.
3) If I start declaring global variables which I know MyBB to use, THEN pull in global.php in the extension directory, I start getting different errors, and eventually, things start to work. However, this isn't viable, as I'd need to anticipate every single global variable MyBB and its third-party extensions use.
I'm guessing this is some simple issue I'm overlooking like a dumb, but does anyone have any insight on this?
What I want to do is create an extension for this new site build which pulls in MyBB support. This extension is in a separate directory.
1) If I pull in global.php in this extension directory, I get errors which don't seem to make sense.
2) If I pull in global.php in the root folder, it seems to work fine.
3) If I start declaring global variables which I know MyBB to use, THEN pull in global.php in the extension directory, I start getting different errors, and eventually, things start to work. However, this isn't viable, as I'd need to anticipate every single global variable MyBB and its third-party extensions use.
I'm guessing this is some simple issue I'm overlooking like a dumb, but does anyone have any insight on this?