petol
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Plugin: WP Super Cache] wp-cache not returning cache filesI has same problem, as you.
But when i switch a theme to “delight” (one of the latest) WP Super Cache works!
Switching back to my own theme — and WP Super Cache is off ??
Forum: Plugins
In reply to: flowplayer pluginCompletely rewritten fp4wp_video() to use original embedding javascript.
Add string to <head>
<script type=”text/javascript” src=”https://litvar.ru/wp-content/plugins/fp4wp/flowplayer/js/flashembed.js”>
</script>
Put flashembed.js to the place.
Call remain the same.<?php /* Plugin Name: fp4wp Plugin URI: https://renechristen.net Description: Embed FlowPlayer in WordPress. Version: 1.1 Author: Rene Christen Author URI: https://renechristen.net Add: Oleg Petol URI: htp://kab.tv */ ?> <?php $fp4wp_uploads_path = '/wp-content/videos/'; $fp4wp_plugins_path = '/wp-content/plugins/'; $url = 'https://litvar.ru'; add_filter('the_content', 'fp4wp_the_content'); function fp4wp_the_content( $content ) { // AUDIO $search = "/\[PLAYER=(.*\.mp3)\]/"; //.mp3 preg_match_all($search, $content, $audio_matches); if (is_array($audio_matches[1])) { foreach ($audio_matches[1] as $filename) { $search = "[PLAYER=".$filename."]"; $replace = fp4wp_audio($filename); $content = str_replace ($search, $replace, $content); } } // VIDEO $search = "/\[PLAYER=(.*) splash=(.*)\]/"; //.mp4,.m4v,.m4a,.mov,.3gp,.flv etc... preg_match_all($search, $content, $video_matches); if (is_array($video_matches[1])) { foreach ($video_matches[1] as $filename) { //echo $filename; $splashname = $video_matches[2][0]; $search = "[PLAYER=".$filename." splash=".$splashname."]"; $replace = fp4wp_video($filename, $splashname); $content = str_replace ($search, $replace, $content); } } return $content; } function fp4wp_audio($filename) { //.mp3 global $fp4wp_uploads_path; global $fp4wp_plugins_path; $string = '<object type="application/x-shockwave-flash" data="' . $fp4wp_plugins_path . 'fp4wp/flowplayer/FlowPlayerLight.swf" width="320" height="22" id="FlowPlayer"><param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="' . $fp4wp_plugins_path . 'fp4wp/flowplayer/FlowPlayerLight.swf" /> <param name="quality" value="high" /> <param name="scale" value="noScale" /> <param name="wmode" value="transparent" /> <param name="flashvars" value="config={playList:[{ url: \'' . $fp4wp_uploads_path . $filename . '\', },], showPlayListButtons: false, loop: false, autoPlay: false, hideControls: false, showFullScreenButton: false, showMenu: false, showLoopButton: false, initialScale: \'orig\', autoBuffering: false }" /></object>'; return $string; } function fp4wp_video($filename, $splashname) { //.mp4,.m4v,.m4a,.mov,.3gp,.flv etc... global $fp4wp_uploads_path; global $fp4wp_plugins_path; global $url; $string = '<script> window.onload = function() { flashembed("flashmovie", { src:\'' . $fp4wp_plugins_path . 'fp4wp/flowplayer/FlowPlayerDark.swf\', width: 400, height: 320 }, {config: { autoPlay:false, showPlayListButtons: true, showStopButton: true, controlBarGloss: \'high\', controlBarBackgroundColor:\'0x000000\', progressBarColor1:\'0x000000\', progressBarColor2:\'0x888888\', initialScale: \'fit\', loop: false, splashImageFile: \'' . $fp4wp_uploads_path . $splashname. '\', videoFile: \'' . $fp4wp_uploads_path . $filename . '\' }} ); } </script><div id="flashmovie"></div>'; return $string; } ?>
Viewing 2 replies - 1 through 2 (of 2 total)