The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Template Question
hi,
Where is the "php_include" template located? (vb3.0.3) |
#2
|
||||
|
||||
there are two now
phpinclude_start and phpinclude_end and they are both in the php include group in the normal template section |
#3
|
||||
|
||||
ah thank you
|
#4
|
||||
|
||||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|