vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Using phpinclude_start - summary (https://vborg.vbsupport.ru/showthread.php?t=79879)

heavi 04-13-2005 05:04 PM

Using phpinclude_start - summary
 
After reviewing various forums to trying and understand how to code my own variables and functions for use with templates in vB. I have found that PHPINCLUDE_START and PHPINCLUDE_END are the only places to add your own code without voiding your user support eligibility. I am creating this thread to get comments, feedback, and clarification on the use of PHPINCLUDE_START.

PHPINCLUDE_START;
- executes before any other templates are parsed
- is the place to define variables, constants, and globals for use in all templates
- is the place to add your own code for use in the templates

Templates that are used in functions do not have access to variables in PHPINCLUDE_START unless the variables are declared a defined as a superglobal ($GLOBALS[]).

A great tutorial by Michael Morris is TUTORIAL: USING PHPINCLUDE_START

Any comments or feedback?

Zachery 04-13-2005 05:12 PM

Quote:

Originally Posted by heavi
After reviewing various forums to trying and understand how to code my own variables and functions for use with templates in vB. I have found that PHPINCLUDE_START and PHPINCLUDE_END are the only places to add your own code without voiding your user support eligibility. I am creating this thread to get comments, feedback, and clarification on the use of PHPINCLUDE_START.

PHPINCLUDE_START;
- executes before any other templates are parsed
- is the place to define variables, constants, and globals for use in all templates
- is the place to add your own code for use in the templates

Templates that are used in functions do not have access to variables in PHPINCLUDE_START unless the variables are declared a defined as a superglobal ($GLOBALS[]).

A great tutorial by Michael Morris is TUTORIAL: USING PHPINCLUDE_START

Any comments or feedback?

Actually, any custom code can void support, our first question is usually whats wrong, and then what hacks or template changes have you made and does the forum work ok without said changes :)

bchertov 04-13-2005 05:25 PM

Quote:

Originally Posted by Zachery
Actually, any custom code can void support, our first question is usually whats wrong, and then what hacks or template changes have you made and does the forum work ok without said changes :)

I note the word "can". I understand your need to just support your (VB) code and not customized code and your question of whether it works without changes is fair. That said, does it matter whether our customizations are done in PHP_INCLUDIE_START/END or elsewhere in the code? What is considered good coding practice?


All times are GMT. The time now is 08:08 PM.

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.01444 seconds
  • Memory Usage 1,715KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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