The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
I'm a relatively experienced PHP-programmer, and I'm just now figuring out how the whole template system can be used on pages that are non-vB. But I've come up against a complication...
Every time I try to move a custom-made file that uses global.php out of the root vB directory, I get problems. Even after going through global.php, sessions.php, functions.php, and config.php -- which are the other required files that come along for the ride -- and changing all the relative filepaths to absolute ones, I just get a blank page. It makes it rather difficult to add new files outside of the directory, say, in a home page. If you leave the file in the root directory and then use it as an include on another php page, you still get the same problems. Ideally, I'd like to set up a subdirectory called "modules" under the forums directory, and just include the files I need as the occasion arises. I've searched this board for an answer to this -- what am I missing? |
#3
|
||||
|
||||
You are the man, Firefly. I spent 2 hours on this problem last night, and here you solve it 30 minutes after I post.
Thanks! |
#4
|
|||
|
|||
I upgraded to PHP 4.1.1 and the above no longer works........
Cost me $300 to upgrade and now revert back to 4.0.6 I've looked for hours with no solution......... Sucks badly........ Everytime I hit another DB with a page that has global.php in it, vB tries to update the session table. Unfortunately, it tries to update it in whatever DB im using at the moment...... WTF? Here's the error: Database error in vBulletin 2.2.2: Invalid SQL: UPDATE session SET lastactivity=1013035241,location='/registry_jc.php' WHERE sessionhash='21f3a3a4a165b93cd85e8b1fdfef8922' mysql error: Table 'jc_z06vette_com.session' doesn't exist My forums DB is jc_forums. and I cannot figure out why the hell it's trying to access my other DB..... JC |
#5
|
||||
|
||||
OT: Why the heck did you pay $300 to upgrade PHP?! It takes no more than 5 minutes, and 4 minutes of it is downloading the package.
Anyhow... in your script, select the forums database before requirng global.php, then select the second database (using mysql_select_db()). |
#6
|
|||
|
|||
[QUOTE]Originally posted by FireFly
OT: Why the heck did you pay $300 to upgrade PHP?! It takes no more than 5 minutes, and 4 minutes of it is downloading the package. |
#7
|
|||
|
|||
Just got back from Florida, will try the above.
And yea, it was $175 to install, and $175 to remove. But they left me an install script for later I don't do anything to my production server myself. Kinda like buying a new car.....I want the warranty Thanks Chen, JC |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|