Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2001, 03:36 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #2  
Old 12-19-2001, 04:11 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use chdir(), like this:
PHP Code:
chdir('/home/sites/yoursite/htdocs/full/path/to/forum/');
require(
'global.php'); 
Changing the path of course to your own.
Reply With Quote
  #3  
Old 12-19-2001, 04:40 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #4  
Old 02-06-2002, 08:33 PM
TheCaver TheCaver is offline
 
Join Date: Oct 2001
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 02-07-2002, 11:49 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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()).
Reply With Quote
  #6  
Old 02-10-2002, 02:41 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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.
Reply With Quote
  #7  
Old 02-20-2002, 01:51 AM
TheCaver TheCaver is offline
 
Join Date: Oct 2001
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04253 seconds
  • Memory Usage 2,221KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete