PDA

Orijinalini görmek için tıklayınız : Video Eklentisi Yahoo ve Megavideo


Munzevi
28-11-2009, 23:57
wp video eklentisinde yahoo ve megavideo kodları olmayanlar için ben kendim yahoo kodlarını düzenledim megavideo kodlarınıda ekledim isteyenler kullanabilirler...



kolay gelsin...




Kod:
// Yahoo! Video code



define("YAHOO_WIDTH", 500);
define("YAHOO_HEIGHT", 425);
define("YAHOO_REGEXP", "/\[yahoo ([[:print:]]+)\]/");
define("YAHOO_TARGET", "");

function yahoo_plugin_callback($match)
{
$output = YAHOO_TARGET;
$output = str_replace("###URL###", $match[1], $output);
return ($output);
}
function yahoo_plugin($content)
{
return (preg_replace_callback(YAHOO_REGEXP, 'yahoo_plugin_callback', $content));
}

add_filter('the_content', 'yahoo_plugin');
add_filter('comment_text', 'yahoo_plugin');




// Megavideo! Video code

define("MEGAVIDEO_WIDTH", 500);
define("MEGAVIDEO_HEIGHT", 425);
define("MEGAVIDEO_REGEXP", "/\[megavideo ([[:print:]]+)\]/");
define("MEGAVIDEO_TARGET", "");

function megavideo_plugin_callback($match)
{
$output = MEGAVIDEO_TARGET;
$output = str_replace("###URL###", $match[1], $output);
return ($output);
}

function megavideo_plugin($content)

{
return (preg_replace_callback(MEGAVIDEO_REGEXP, 'megavideo_plugin_callback', $content));
}

add_filter('the_content', 'megavideo_plugin');
add_filter('comment_text', 'megavideo_plugin');




?>