pokemonleague
11-29-2007, 01:39 AM
I'm using the plugin method described in the manual to run a php script, but am having some problems. I need to be able to access $bbuserinfo[userid]. I also need to pass a variable to the script through the url. As far as I can tell, the php script is processed before the vBulletin page and is stored in a variable.
I have tried to pass a variable through the link with no success.
include('ladderpanel.php?op=top');
Including a PHP file:
1. Create a Plug-in for global_start with these contents:
ob_start();
include('path/to/this/file/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();
Replace the path and filename with the correct path and filename of the PHP file you want to include. The code in myfile.php will execute and any output generated by this script will be stored in $includedphp.
2. Place $includedphp in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the contents of your PHP file to appear.
I have tried to pass a variable through the link with no success.
include('ladderpanel.php?op=top');
Including a PHP file:
1. Create a Plug-in for global_start with these contents:
ob_start();
include('path/to/this/file/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();
Replace the path and filename with the correct path and filename of the PHP file you want to include. The code in myfile.php will execute and any output generated by this script will be stored in $includedphp.
2. Place $includedphp in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the contents of your PHP file to appear.