vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Template Question (https://vborg.vbsupport.ru/showthread.php?t=70910)

Spyke 10-23-2004 02:25 PM

Template Question
 
hi,

Where is the "php_include" template located? (vb3.0.3)

Xenon 10-23-2004 03:40 PM

there are two now

phpinclude_start and phpinclude_end and they are both in the php include group in the normal template section :)

Spyke 10-23-2004 04:08 PM

ah thank you :)

Michael Morris 10-23-2004 05:16 PM

FYI, phpinclude_start parses right before any other templates are called, but just after style information and options have been loaded. You can therefore use it to change stylevars, vboptions, and so on. For instance, you can use phpinclude_start along with a custom user field to create a user switch to control whether the vb3 postbit layout is used or the vb2 layout is used. At the Wizards of the Coast forums I used it extensively to insure that the loaded headers of the pages where set by the forum and not by the style sheet.

phpinclude_end is parsed just prior to output being sent out. You can use it to do conditional replacement variables on the output. For instance at ENWorld I use such a conditional to load a different header graphic for the vbadvance CMPS pages.

Both include templates are evaluated between @ob_start; and @ob_end; calls (Object buffering). This prevents print statements and echos from printing anything they do. You can however use @ob_end; to echo something to the screen during the template, though this isn't advised and is against vbulletin coding conventions (as anything you echo to the screen prior to final printing can't be affected by str_replace variables and so on. This said, if you have a php_include script that reaches an error condition and needs to exit prior to evaluating anything you would want to turn object buffering off to send the error message.


All times are GMT. The time now is 08:12 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.01402 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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