You need to convert all your print statements to be outputting to the $output variable. There are several php widgets here in the mods forum. You may want to download a couple of them and see how they went about this. (When I wrote mine, I actually created it's own template instead of using the vbcms_widget_execphp_page template, but other users did you that template.)
|