vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Chopping up global.php (https://vborg.vbsupport.ru/showthread.php?t=73988)

Tekton 01-08-2005 08:34 AM

Chopping up global.php
 
Hiya. I'm working on a project and recently wondered if it was possible to cut some of the bits of global.php and what it includes from it. Has anyone tried this by removing parts of it? I've added to it, but I haven't attempted to remove complete sections of it.

~And I mean making a copy of global.php like global_lite.php and only including things such as user login, and perhaps a few of the other neccesary files.

Xenon 01-08-2005 11:51 AM

you have several ways to remove some steps

either just include init.php which does the DB initialisation and such, or if you just don't want the location parts, add a
PHP Code:

define('LOCATION_BYPASS'1); 

before the actual require step

Tekton 01-09-2005 07:35 AM

Quote:

Originally Posted by Xenon
you have several ways to remove some steps

either just include init.php which does the DB initialisation and such, or if you just don't want the location parts, add a
PHP Code:

define('LOCATION_BYPASS'1); 

before the actual require step

I'm not sure what location parts you mean, but thanks; I wasn't aware init.php had everything that was needed. Does it include more files after it though, or is it all in init.php?

rake 01-09-2005 08:15 AM

LOCATION_BYPASS means that the session table will not be updated with the current page, so the page will not appear in who's online.

Tekton 01-09-2005 10:46 AM

Ah, well I s'pose that's fine to keep. :P

Thanks guys.

Xenon 01-09-2005 01:52 PM

you're welcome :)

and to answer your question: the config file and the db class are included, other files normally not, but can be included (if the options array is corrupted for example)


All times are GMT. The time now is 08:18 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.01042 seconds
  • Memory Usage 1,721KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete