If you want to include an external php file on your vBulletin templates you’ll need more than just following this https://vbulletin.com/docs/html/templates_externalfiles
Instead of just creating a plugin like:
ob_start();
include('path/to/this/file/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();
You will need to add a last line, as following:
ob_start();
include('path/to/this/file/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('TEMPLATE',array('includedphp' => $includedphp));
You will have to change the “TEMPLATE” and “path/to/this/file/myfile.php” as fits your needs.