function flagShowSkin_banner_widget_default($args) { extract($args); $flag_options = get_option('flag_options'); $skinID = 'id_' . mt_rand(); // look up for the path $skinpath = trailingslashit($flag_options['skinsDirABS']) . $skin; $playlistpath = $flag_options['galleryPath'] . 'playlists/banner/' . $xml . '.xml'; $js = $flag_options['skinsDirURL'] . $skin . "/jquery.cycle.lite.js"; $data = file_get_contents($skinpath . '/settings/settings.xml'); $flashBackcolor = flagGetBetween($data, '<property1>0x', '</property1>'); if (empty($width)) { $width = flagGetBetween($data, '<width><![CDATA[', ']]></width>'); } if (empty($height)) { $height = flagGetBetween($data, '<height><![CDATA[', ']]></height>'); } $wmode = flagGetBetween($data, '<property0><![CDATA[', ']]></property0>'); if (empty($flashBackcolor)) { $flashBackcolor = $flag_options['flashBackcolor']; } $params['autoPlay'] = flagGetBetween($data, '<autoPlay>', '</autoPlay>'); $params['slideshowDelay'] = flagGetBetween($data, '<slideshowDelay>', '</slideshowDelay>'); $alternate = get_include_contents($skinpath . "/jgallery.php", $playlistpath, $skin, $skinID, $width, $height, $params); // init the flash output $swfobject = new flag_swfobject($flag_options['skinsDirURL'] . $skin . '/gallery.swf', $skinID, $width, $height, '10.1.52', plugins_url('/' . FLAGFOLDER . '/') . 'skins/expressInstall.swf'); global $swfCounter; $swfobject->add_params('wmode', $wmode); $swfobject->add_params('allowfullscreen', 'true'); $swfobject->add_params('allowScriptAccess', 'always'); $swfobject->add_params('saling', 'lt'); $swfobject->add_params('scale', 'noScale'); $swfobject->add_params('menu', 'false'); $swfobject->add_params('bgcolor', '#' . $flashBackcolor); $swfobject->add_attributes('id', $skinID); $swfobject->add_attributes('name', $skinID); // adding the flash parameter $swfobject->add_flashvars('path', $flag_options['skinsDirURL'] . $skin . '/'); $swfobject->add_flashvars('skinID', $skinID); $swfobject->add_flashvars('playlist', $xml); // create the output $out = '<div class="grandbanner ' . $wmode . '">' . $swfobject->output($alternate) . '</div>'; // add now the script code $out .= "\n" . '<script type="text/javascript" src="' . $js . '"></script>'; $out .= "\n" . '<script type="text/javascript" defer="defer">'; $out .= $swfobject->javascript(); $out .= "\n" . '</script>'; $out = apply_filters('flag_show_flash_w_content', $out); return $out; }
function flagShowSkin_video_default($args) { extract($args); $flag_options = get_option('flag_options'); $skinID = 'id_' . mt_rand(); // look up for the path $playlistpath = ABSPATH . $flag_options['galleryPath'] . 'playlists/video/' . $playlist . '.xml'; $data = file_get_contents($playlistpath); $flashBackcolor = flagGetBetween($data, '<property1>0x', '</property1>'); if (empty($width)) { $width = flagGetBetween($data, '<width><![CDATA[', ']]></width>'); } if (empty($height)) { $height = flagGetBetween($data, '<height><![CDATA[', ']]></height>'); } if (empty($wmode)) { $wmode = flagGetBetween($data, '<property0><![CDATA[', ']]></property0>'); } if (empty($flashBackcolor)) { $flashBackcolor = $flag_options['flashBackcolor']; } require_once FLAG_ABSPATH . 'admin/video.functions.php'; $playlist_data = get_v_playlist_data($playlistpath); $alternative = ''; if (count($playlist_data['items'])) { foreach ($playlist_data['items'] as $id) { $videoObject = get_post($id); $url = wp_get_attachment_url($videoObject->ID); $thumb = get_post_meta($videoObject->ID, 'thumbnail', true); $aimg = $thumb ? '<img src="' . $thumb . '" style="float:left;margin-right:10px;width:150px;height:auto;" alt="" />' : ''; $atitle = $videoObject->post_title ? '<strong>' . $videoObject->post_title . '</strong>' : ''; $acontent = $videoObject->post_content ? '<div style="padding:4px 0;">' . $videoObject->post_content . '</div>' : ''; $alternative .= '<div id="video_' . $videoObject->ID . '" style="overflow:hidden;padding:7px 0;">' . $aimg . $atitle . $acontent . '<div style="font-size:80%;">This browser does not support flv files! You can <a href="' . $url . '">download the video</a> instead.</div></div>'; } } // init the flash output $swfobject = new flag_swfobject($flag_options['skinsDirURL'] . $skin . '/gallery.swf', $skinID, $width, $height, '10.1.52', plugins_url('/' . FLAGFOLDER . '/') . 'skins/expressInstall.swf'); global $swfCounter; $swfobject->add_params('wmode', $wmode); $swfobject->add_params('allowfullscreen', 'true'); $swfobject->add_params('allowScriptAccess', 'always'); $swfobject->add_params('saling', 'lt'); $swfobject->add_params('scale', 'noScale'); $swfobject->add_params('menu', 'false'); $swfobject->add_params('bgcolor', '#' . $flashBackcolor); $swfobject->add_attributes('id', $skinID); $swfobject->add_attributes('name', $skinID); // adding the flash parameter $swfobject->add_flashvars('path', $flag_options['skinsDirURL'] . $skin . '/'); $swfobject->add_flashvars('skinID', $skinID); $swfobject->add_flashvars('playlist', $playlist); // create the output $out = '<div class="grandvideo">' . $swfobject->output($alternative) . '</div>'; // add now the script code $out .= '<script type="text/javascript" defer="defer">'; $out .= $swfobject->javascript(); $out .= '</script>'; $out = apply_filters('flag_show_flash_v_content', $out); return $out; }
function flagShowSkin_music_default($args) { extract($args); $flag_options = get_option('flag_options'); $skinID = 'id_' . mt_rand(); // look up for the path $playlistpath = ABSPATH . $flag_options['galleryPath'] . 'playlists/' . $playlist . '.xml'; if ($isWidget) { $skinpath = trailingslashit($flag_options['skinsDirABS']) . $skin; $data = file_get_contents($skinpath . '/settings/settings.xml'); } else { $data = file_get_contents($playlistpath); } $flashBackcolor = flagGetBetween($data, '<property1>0x', '</property1>'); if (empty($width)) { $width = flagGetBetween($data, '<width><![CDATA[', ']]></width>'); } if (empty($height)) { $height = flagGetBetween($data, '<height><![CDATA[', ']]></height>'); } if (empty($wmode)) { $wmode = flagGetBetween($data, '<property0><![CDATA[', ']]></property0>'); } if (empty($flashBackcolor)) { $flashBackcolor = $flag_options['flashBackcolor']; } require_once FLAG_ABSPATH . 'admin/playlist.functions.php'; $playlist_data = get_playlist_data($playlistpath); $alternative = ''; if (count($playlist_data['items'])) { foreach ($playlist_data['items'] as $id) { $mp3Object = get_post($id); $url = wp_get_attachment_url($mp3Object->ID); $thumb = get_post_meta($mp3Object->ID, 'thumbnail', true); $aimg = $thumb ? '<img src="' . $thumb . '" style="float:left;margin-right:10px;width:150px;height:auto;" alt="" />' : ''; $atitle = $mp3Object->post_title ? '<strong style="display:block;">' . $mp3Object->post_title . '</strong>' : ''; $acontent = $mp3Object->post_content ? '<div style="padding:4px 0;">' . $mp3Object->post_content . '</div>' : ''; $alternative .= '<div id="audio_' . $mp3Object->ID . '" style="overflow:hidden;padding:7px 0;">' . $aimg . $atitle . $acontent . '<p><audio src="' . $url . '" controls preload="none" autobuffer="false"></audio></p></div>'; } } // init the flash output $swfobject = new flag_swfobject($flag_options['skinsDirURL'] . $skin . '/gallery.swf', $skinID, $width, $height, '10.1.52', plugins_url('/' . FLAGFOLDER . '/') . 'skins/expressInstall.swf'); global $swfCounter; $swfobject->add_params('wmode', $wmode); $swfobject->add_params('allowfullscreen', 'true'); $swfobject->add_params('allowScriptAccess', 'always'); $swfobject->add_params('saling', 'lt'); $swfobject->add_params('scale', 'noScale'); $swfobject->add_params('menu', 'false'); $swfobject->add_params('bgcolor', '#' . $flashBackcolor); $swfobject->add_attributes('id', $skinID); $swfobject->add_attributes('name', $skinID); // adding the flash parameter $swfobject->add_flashvars('path', $flag_options['skinsDirURL'] . $skin . '/'); $swfobject->add_flashvars('skinID', $skinID); $swfobject->add_flashvars('playlist', $playlist); if ($isWidget) { $swfobject->add_flashvars('widget', 1); } // create the output $out = '<div class="grandmusic">' . $swfobject->output($alternative) . '</div>'; // add now the script code if (!$crawler) { $out .= '<script type="text/javascript" defer="defer">'; $out .= $swfobject->javascript(); $out .= '</script>'; } $out = apply_filters('flag_show_flash_content', $out); return $out; }
function flagShowVmPlayer($id, $w, $h, $autoplay) { require_once dirname(__FILE__) . '/class.swfobject.php'; $flag_options = get_option('flag_options'); $vID = 'vid_' . mt_rand(); if (empty($w)) { $w = $flag_options['vWidth']; } if (empty($h)) { $h = $flag_options['vHeight']; } if (empty($autoplay)) { $autoplay = $flag_options['vAutoplay']; } // init the flash output $swfobject = new flag_swfobject(plugins_url('/lib/video_mini.swf', dirname(__FILE__)), $vID, $w, $h, '10.1.52', plugins_url('/skins/expressInstall.swf', dirname(__FILE__))); $videoObject = get_post($id); $url = wp_get_attachment_url($videoObject->ID); $thumb = get_post_meta($videoObject->ID, 'thumbnail', true); $aimg = $thumb ? '<img src="' . $thumb . '" style="float:left;margin-right:10px;width:150px;height:auto;" alt="" />' : ''; $atitle = $videoObject->post_title ? '<strong>' . $videoObject->post_title . '</strong>' : ''; $acontent = $videoObject->post_content ? '<div style="padding:4px 0;">' . $videoObject->post_content . '</div>' : ''; $alternative = '<div id="video_' . $videoObject->ID . '" style="overflow:hidden;padding:7px 0;">' . $aimg . $atitle . $acontent . '<div style="font-size:80%;">This browser does not support flash! You can <a href="' . $url . '">download the video</a> instead.</div></div>'; $swfobject->add_params('wmode', 'transparent'); $swfobject->add_params('allowfullscreen', 'true'); $swfobject->add_params('allowScriptAccess', 'always'); $swfobject->add_params('saling', 'lt'); $swfobject->add_params('scale', 'noScale'); $swfobject->add_params('menu', 'false'); $swfobject->add_params('bgcolor', '#' . $flag_options['videoBG']); $swfobject->add_attributes('styleclass', 'grandflv'); $swfobject->add_attributes('id', $vID); // adding the flash parameter $swfobject->add_flashvars('path', plugins_url('/lib/', dirname(__FILE__))); $swfobject->add_flashvars('vID', $id); $swfobject->add_flashvars('flashID', $vID); $swfobject->add_flashvars('autoplay', $autoplay); // create the output $out = '<div class="grandflv">' . $swfobject->output($alternative) . '</div>'; if (!flagGetUserNow($_SERVER['HTTP_USER_AGENT'])) { // add now the script code $out .= '<script type="text/javascript" defer="defer">'; $out .= $swfobject->javascript(); $out .= '</script>'; } $out = apply_filters('flag_flv_mini', $out); // Replace doubled spaces with single ones (ignored in HTML any way) // Remove single and multiline comments, tabs and newline chars //$out = preg_replace('@(\s){2,}@', '\1', $out); //$out = preg_replace( // '@(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|((?<!:)//.*)|[\t\r\n]@i', // '', // $out //); return $out; }