The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Can anybody point me to what vB's print_output does?
I noticed that the last statement in functions.php (that's where it is defined) is an exit, so print_output halts any php-script where it is used. What is the standard way to output a template (fetched by fetch_template())? |
#2
|
||||
|
||||
![]()
print_output() is used to compile the final page in any of the scripts (forum side). You'll notice that the lines with print output that are evaled in the forum side php files contain the template with the main skeleton HTML for the page. This function also calls process_replacement_vars() which as the name suggest does the replacement vars for the style you are on.
This is the only time you should echo directly out to the browser. fetch_template() does just as the name suggests, you're not supposed to echo its contents out untill the end of the page when you use print_output(). |
#3
|
|||
|
|||
![]()
NTLDR, that's great -- thanks for the clarification. So would the approach be to fetch some tamplates and store em in evaled vars and finally concatenate them for final output, as in:
PHP Code:
|
#4
|
||||
|
||||
![]()
Normally $all would have been a template too, but if it wasn't going to contain HTML I guess its not strictly needed. However its addvisable not to hard code stuff into files and to use the template/phrase system where posible.
Not sure if your evals will work like that, here's how they are done throughout vB3: PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|