PDA

View Full Version : Run php code in plugin


Dudsmack
09-16-2007, 12:36 AM
Just an idea I had - possibly for someone who's had some experience making vB plugins.

Basically, have a plugin, in which you specify a full-path to a php-script as well as a hook for it to be executed on. The plug-in itself would would use output buffering to grab filename.php's output and spits the output to a variable which could be printed out in a template.

The plugin would make sure the forums are active before parsing filename.php.

Adrian Schneider
09-16-2007, 01:36 AM
Something like this should work,ob_start();
include('/path/to/file.php');
$data = ob_get_contents();
ob_end_clean();Cheers