vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Custom Pages Running from subfolder? (https://vborg.vbsupport.ru/showthread.php?t=178233)

John3971 05-05-2008 08:16 PM

Custom Pages Running from subfolder?
 
How can i have my custom modification php file run from another folder? i can´t get it to show anything if i have it in another subfolder in my forum root.

GameWizard 05-05-2008 09:37 PM

Inside the php file, you must point to the global.php file which should show up as ../global.php rather than ./global.php or just global.php. You must point to it seeing as how its not in the main dir.

Also, you may need to correct the chdir aswell, although that should be accurate already.

Dismounted 05-06-2008 11:55 AM

Do not use links to other folders in including global.php. Always change the directory to the folder with global.php before including it, not doing so will break the includes.

John3971 05-07-2008 01:51 PM

Quote:

Originally Posted by Dismounted (Post 1510332)
Do not use links to other folders in including global.php. Always change the directory to the folder with global.php before including it, not doing so will break the includes.

don?t understand what you mean?

Lynne 05-07-2008 03:29 PM

Quote:

Originally Posted by John3971 (Post 1511643)
don?t understand what you mean?

He means change the directory (chdir) and then include the global.php file. Like this:

Code:

chdir('/home/yoursite/public_html/forums');
require_once('./global.php');

Not like this:
Code:

require_once('../global.php');

John3971 05-07-2008 03:32 PM

ah ok will try that

John3971 05-11-2008 06:09 PM

how do i fix so i fill in the path in the vbsettings and it get it from there?

Dismounted 05-12-2008 06:27 AM

Fix what?

John3971 05-12-2008 06:43 AM

This: chdir('/home/yoursite/public_html/forums'); i don´t wanna have to edit it in the php file so how can i fix so i put the path in vboption and then it writes there.

Dismounted 05-12-2008 06:48 AM

To access vBulletin options, you need to include global.php, to include global.php, you need to set a proper directory.


All times are GMT. The time now is 10:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01021 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete