コード例 #1
0
function fetchSWFWidgetCode($widget, $params, $width, $height, $bgcolor = "#FFFFFF")
{
    global $CFG;
    $widgetid = html_writer::random_id('laszlobase');
    $widgetjson = \filter_poodll\poodlltools::fetchSWFWidgetJSON($widget, $params, $width, $height, $bgcolor = "#FFFFFF", $widgetid);
    $retcode = html_writer::div('', '', array('id' => $widgetid . 'Container'));
    $retcode .= '<script type="text/javascript" src="' . $CFG->httpswwwroot . '/filter/poodll/flash/embed-compressed.js"></script>
        <script type="text/javascript"> lz.embed.swf(' . $widgetjson . ')</script>';
    return $retcode;
}