PDA

View Full Version : Plugin help for vb4


macc
18 Dec 2009, 23:16
Hello

Need some help...

i have one plugin on my vb 3.8.4 and that work fine ...(this is for my slideshow)
code is:

ob_start();
include('test_test.php');
$jwfpss = ob_get_contents();
ob_end_clean();

and on forumhome template i just put $jwfpss, under $navbar ...

but problem is on my test board with vb4 ... can not get this to work

can some help me or what i must to do..maybe in plugin code (init_startup)!

regards

macc

Lynne
18 Dec 2009, 23:18
This very subject seems to come up every couple of days right now. You need to register ALL variables for use in a template. You can't just throw $jwfpss into a template and expect anything to be passed to it. You may want to go look at one of the other threads about this issue and see what is posted.

macc
18 Dec 2009, 23:24
Thanks ..can you help me please ... i do not think that is so complicated ... how to find similar threads or same problem?

regards

macc

James Birkett
18 Dec 2009, 23:52
http://www.vbulletin.org/forum/showthread.php?t=228078

macc
19 Dec 2009, 00:08
Thanks for link ...but can not found solution for my problem!

regards

macc

Lynne
19 Dec 2009, 00:16
Try a search on "ob_start" in these forums and you should find other threads about this issue.

The article linked to tells you how to preregister your variable for use in a whatever template you want to use it in.

macc
19 Dec 2009, 01:23
Found something ..and make like this ...
plugin code:

ob_start();
include('test_slide.php');
$jwfpss = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('forumhome', array('jwfpss' => $jwfpss));

and put this {vb:raw jwfpss} on my forumhome template ...

but no results ...works not ..and no error messages ... just slideshow come not up!

have you some solutions?

regards

macc

you can visit my site (like guest) and you will see slideshow ... works fine on vb 3.8.4

consolegaming
19 Dec 2009, 01:53
Which hook is the plugin attached to?

macc
19 Dec 2009, 01:53
Fixed - Thanks for help!

forumhome = FORUMHOME and it works ...

regards

macc