PDA

View Full Version : Trouble with Plugin in vBulletin 4.0.8


cnanders
10-26-2010, 05:13 PM
All,

I'm trying to create a plugin that can include a custom PHP file in the footer of my forum. I followed the instructions here http://www.vbulletin.com/forum/showthread.php?173937-How-to-Include-a-PHP-or-HTML-File exactly and it still is not working.

I even tried to go way simpler and just echo + store a string that I could then output in a template but I couldn't get this working either (picture attached). The plugin was written as follows:

Hook = "global_start"

Plugin code ==

ob_start();
echo("hello world");
$echo_output = ob_get_contents();
ob_end_clean();

Active == Yes

then I tried to use the variable inside of the footer template like this:

{vb:raw echo_output}

but it didn't work.

I'm wondering if someone can post an example of a working plugin that does the same thing.

Thanks,
Chris

Lynne
10-26-2010, 06:23 PM
That article was regarding vB3.x You now need to register variables for use in templates. This exact problem has been covered a number of times - try a search on something like ob_start and you should find several threads about this.