How do I do this in xenForo?

Brent W

Well-known member
Pretty simple plugin on vBulletin that includes a file and allows me to include that in a template with a variable.

PHP:
ob_start();
include_once('/home/www/file.php');
$filecontent = ob_get_contents();
ob_end_clean();

and where $filecontent was placed the contents of file.php would show in the template. (Need it in Footer template)
 
you can also put it as a hook. I think this is what you was wanting. It pulls external php file. I think that hook name is located where you want but there are a couple other hooks to use.


if($hookName == 'footer')
{
ob_start();
require_once('folder/your_file.php');
$contents .= ob_get_contents();
ob_end_clean();
}
 
Top Bottom