The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Including global.php when forum set to not active.
I've been doing some testing in preparation for moving from SMF to vBulletin and I noticed something strange. I include global.php in various files to access the vbulletin apis and that all works fine normally. If I then go into the forum admin and set the forum to not active, suddenly the pages that include global.php no longer render any content at all. The first thing I do is include global.php in those php files. If I comment it out, the files render fine. I do not get any errors or exceptions, it just seems to fail.
Does anyone have any suggestions here? I would like to be able to turn off the forum without having to worry about crashing my whole site. EDIT: I just tried this again, and strangely this time I'm seeing "Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error." |
#2
|
|||
|
|||
If the forum is shut down and you're not an admin, then you should be redirected to an error page. I don't know why that isn't working for you, maybe it's redirecting you to an invalid page for some reason.
I've never tried it but it looks like you could handle the forum closed in your custom script by defining 'BYPASS_FORUM_DISABLED' before including global.php, then check for !$vbulletin->options['bbactive'] yourself (if you want). |
#3
|
|||
|
|||
There shouldn't be a redirect here because I'm not on a forum page. I'm on an external page that is including global.php and nobody is logged in at the time. It doesn't really matter, I just don't understand what is failing since I can't seem to find any errors, but nothing renders.
|
#4
|
|||
|
|||
But I think you will get a redirect because it's done by the code that runs when you include global.php. I suppose it's possible that I missed something and it doesn't happen on a non-vb page.
I use a Firefox addon called "Tamper Data" to see what's going on with stuff like that. It will show you if a page returns a redirect. (I'm sure there are other tools that do the same thing). |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|