PDA

View Full Version : Vb4.2.1 custom plugin


stryka
09-22-2013, 09:54 PM
I had the following custom plugin in VB3.8 global that referenced a PHP file and i simply called the VB paramater in the style but after the upgrade this doesn't seem to work anymore?

What is new syntax to make this work?

ob_start();
include('/home/me/www/gallery/inc_features1.php');
$include_latestpics = ob_get_contents();
ob_end_clean();

ob_start();
include('/home/me/www/gallery/inc_features0.php');
$include_latestpics2 = ob_get_contents();
ob_end_clean();

Paul M
09-22-2013, 11:18 PM
That plugin, as listed, will work in vb4.

So ...
What doesnt work exactly ?
What do you mean by "i simply called the VB paramater in the style" ?

Lynne
09-22-2013, 11:48 PM
You need to register a variable for use in a template. So, you will need to register $include_latestpics and $include_latestpics2 for us in whatever template you are using them in.

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)

stryka
09-23-2013, 02:28 AM
Yes.... i should've been more specific on "not working"...

Basically... that code doesn't generate an error when the plugin is on... but I am trying to show the resulting data from the pHP within a forum block

Previously i was able to refer to variable that was defined within PHP include file...

I will try and read that article again... been awhile since i had to play with this stuff...