Log in

View Full Version : PHP Includes Problem


Narutoboy
10-06-2013, 02:37 PM
I've created my header in php and added it as a php include through the plugin system. The problem I'm having is getting the default vBulletin variables (e.g. $vbphrase[avatar]) to work. The system doesn't seem to acknowledge them at all. Can anyone help me out here?

ozzy47
10-06-2013, 02:42 PM
What is the code you have used?

Narutoboy
10-06-2013, 02:47 PM
What is the code you have used?

This is inside the plugin system "global_start":
ob_start();
include('thetest.php');
$includedphp = ob_get_contents();
ob_end_clean();

Then I included "$includephp" in the template files. It creates the header background and all of the graphics, it just doesn't populate them with the information/dynamic content provided by the vBulletin variables.

Simon Lloyd
10-07-2013, 09:35 AM
You'd probably need to add global $vbulletin; at the very top of your plugin code or take a look here https://vborg.vbsupport.ru/showthread.php?t=263517 or here https://vborg.vbsupport.ru/showthread.php?t=286403 for inserting things where you want :)