View Full Version : Include the output of an .php in an template?
Hi,
I've just downloaded the active threads hack, that the latest 5 active threads are displayed...
It works when i call the php directly, but how can i let it show up on my index.php?
I tried to include it in the template but that doesn't work...
Thnx
does nobody know an answer?
i've searched for it, but i haven't found it.. :(
If you want to put it in the header template that's being parsed as PHP you can put:
ob_start();
include("phpfile.php");
$header .= ob_get_contents();
ob_end_clean();
(PHP4 only)
yeah i know, i just want it to be in an regular vbulletin template, like forumhome or so.. how can i let that template be parsed then?
You need to assign the parsed code to a variable and put that variable in your template...
If you look through the code you will understand how this is done. Each subtemplate is simply evaluated down to a variable of the same name (i.e. $postbit) and that is placed in another template.
okay, thanks.. i hope i can make it work..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.