PDA

View Full Version : Plugin help for vb4


macc
12-18-2009, 09:16 PM
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
12-18-2009, 09:18 PM
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
12-18-2009, 09:24 PM
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
12-18-2009, 09:52 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=228078" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=228078</a>

macc
12-18-2009, 10:08 PM
Thanks for link ...but can not found solution for my problem!

regards

macc

Lynne
12-18-2009, 10:16 PM
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
12-18-2009, 11:23 PM
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
12-18-2009, 11:53 PM
Which hook is the plugin attached to?

macc
12-18-2009, 11:53 PM
Fixed - Thanks for help!

forumhome = FORUMHOME and it works ...

regards

macc