"); function kewego_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = KEWEGO_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); $output = str_replace("###LCODE###", KEWEGO_LCODE, $output); $output = str_replace("###PKEY###", KEWEGO_PLAYERKEY, $output); $output = str_replace("###SKEY###", KEWEGO_SKINKEY, $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", KEWEGO_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", KEWEGO_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", KEWEGO_WIDTH, $output); $output = str_replace("###HEIGHT###", KEWEGO_HEIGHT, $output); } return ($output); } function kewego_plugin($content) { return (preg_replace_callback(KEWEGO_REGEXP, 'kewego_plugin_callback', $content)); } add_filter('the_content', 'kewego_plugin', 1); add_filter('the_content_rss', 'kewego_plugin'); add_filter('comment_text', 'kewego_plugin'); // FLICKR CODE by an anonymous user define("FLICKR_WIDTH", 308); // default width define("FLICKR_HEIGHT", 250); // default height define("FLICKR_REGEXP", "/\[flickr ([[:print:]]+)\]/"); define("FLICKR_TARGET", ""); function flickr_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = FLICKR_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", FLICKR_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", FLICKR_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", FLICKR_WIDTH, $output); $output = str_replace("###HEIGHT###", FLICKR_HEIGHT, $output); } return ($output); } function flickr_plugin($content) { return (preg_replace_callback(FLICKR_REGEXP, 'flickr_plugin_callback', $content)); } add_filter('the_content', 'flickr_plugin',1); add_filter('the_content_rss', 'flickr_plugin'); add_filter('comment_text', 'flickr_plugin'); // FB Code // Code for FaceBook video // credits: roberto scano http://robertoscano.info define("FB_WIDTH", 470); define("FB_HEIGHT", 306); define("FB_REGEXP", "/\[FB ([[:print:]]+)\]/"); define("FB_TARGET", ""); function FB_plugin_callback($match) { $output = FB_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function FB_plugin($content) { return preg_replace_callback(FB_REGEXP, 'FB_plugin_callback', $content); } add_filter('the_content', 'FB_plugin'); add_filter('comment_text', 'FB_plugin'); // current code define("CURRENT_WIDTH", 400); // default width define("CURRENT_HEIGHT", 342); // default height define("CURRENT_REGEXP", "/\[current ([[:print:]]+)\]/"); define("CURRENT_TARGET", ""); function current_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = CURRENT_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", CURRENT_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", CURRENT_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", CURRENT_WIDTH, $output); $output = str_replace("###HEIGHT###", CURRENT_HEIGHT, $output); } return ($output); } function current_plugin($content) { return (preg_replace_callback(CURRENT_REGEXP, 'current_plugin_callback', $content)); } add_filter('the_content', 'current_plugin'); add_filter('the_content_rss', 'current_plugin'); add_filter('comment_text', 'current_plugin'); // screencast-o-matic code define("SCREENCAST_WIDTH", 504); // default width define("SCREENCAST_HEIGHT", 424); // default height define("SCREENCAST_REGEXP", "/\[screencast ([[:print:]]+)\]/"); define("SCREENCAST_TARGET", ""); function screencast_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = SCREENCAST_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", SCREENCAST_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", SCREENCAST_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", SCREENCAST_WIDTH, $output); $output = str_replace("###HEIGHT###", SCREENCAST_HEIGHT, $output); } return ($output); } function screencast_plugin($content) { return (preg_replace_callback(SCREENCAST_REGEXP, 'screencast_plugin_callback', $content)); } add_filter('the_content', 'screencast_plugin'); add_filter('the_content_rss', 'screencast_plugin'); add_filter('comment_text', 'screencast_plugin'); // dotSUB code define("DOTSUB_WIDTH", 420); // default width define("DOTSUB_HEIGHT", 347); // default height define("DOTSUB_REGEXP", "/\[dotsub ([[:print:]]+)\]/"); define("DOTSUB_TARGET", ""); function dotsub_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = DOTSUB_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", DOTSUB_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", DOTSUB_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", DOTSUB_WIDTH, $output); $output = str_replace("###HEIGHT###", DOTSUB_HEIGHT, $output); } return ($output); } function dotsub_plugin($content) { return (preg_replace_callback(DOTSUB_REGEXP, 'dotsub_plugin_callback', $content)); } add_filter('the_content', 'dotsub_plugin'); add_filter('the_content_rss', 'dotsub_plugin'); add_filter('comment_text', 'dotsub_plugin'); // OnSMASH code define("ONSMASH_WIDTH", 448); // default width define("ONSMASH_HEIGHT", 374); // default height define("ONSMASH_REGEXP", "/\[onsmash ([[:print:]]+)\]/"); define("ONSMASH_TARGET", ""); function onsmash_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = ONSMASH_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", ONSMASH_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", ONSMASH_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", ONSMASH_WIDTH, $output); $output = str_replace("###HEIGHT###", ONSMASH_HEIGHT, $output); } return ($output); } function onsmash_plugin($content) { return (preg_replace_callback(ONSMASH_REGEXP, 'onsmash_plugin_callback', $content)); } add_filter('the_content', 'onsmash_plugin'); add_filter('the_content_rss', 'onsmash_plugin'); add_filter('comment_text', 'onsmash_plugin'); // Smotri.Com code define("SMOTRI_WIDTH", 400); // default width define("SMOTRI_HEIGHT", 330); // default height define("SMOTRI_REGEXP", "/\[smotri ([[:print:]]+)\]/"); define("SMOTRI_TARGET", ""); function smotri_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = SMOTRI_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", SMOTRI_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", SMOTRI_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", SMOTRI_WIDTH, $output); $output = str_replace("###HEIGHT###", SMOTRI_HEIGHT, $output); } return ($output); } function smotri_plugin($content) { return (preg_replace_callback(SMOTRI_REGEXP, 'smotri_plugin_callback', $content)); } add_filter('the_content', 'smotri_plugin'); add_filter('the_content_rss', 'smotri_plugin'); add_filter('comment_text', 'smotri_plugin'); // wat.tv code by Bertimus (http://www.born2buzz.com/) define("WAT_WIDTH", 430); // default width define("WAT_HEIGHT", 385); // default height define("WAT_REGEXP", "/\[wat ([[:print:]]+)\]/"); define("WAT_TARGET", ""); function wat_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = WAT_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", WAT_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", WAT_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", WAT_WIDTH, $output); $output = str_replace("###HEIGHT###", WAT_HEIGHT, $output); } return ($output); } function wat_plugin($content) { return (preg_replace_callback(WAT_REGEXP, 'wat_plugin_callback', $content)); } add_filter('the_content', 'wat_plugin'); add_filter('the_content_rss', 'wat_plugin'); add_filter('comment_text', 'wat_plugin'); // Guba code define("GUBA_WIDTH", 375); // default width define("GUBA_HEIGHT", 360); // default height define("GUBA_REGEXP", "/\[guba ([[:print:]]+)\]/"); define("GUBA_TARGET", ""); function guba_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = GUBA_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", GUBA_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", GUBA_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", GUBA_WIDTH, $output); $output = str_replace("###HEIGHT###", GUBA_HEIGHT, $output); } return ($output); } function guba_plugin($content) { return (preg_replace_callback(GUBA_REGEXP, 'guba_plugin_callback', $content)); } add_filter('the_content', 'guba_plugin'); add_filter('the_content_rss', 'guba_plugin'); add_filter('comment_text', 'guba_plugin'); // GoalVideoz code define("GOALVIDEOZ_WIDTH", 425); // default width define("GOALVIDEOZ_HEIGHT", 350); // default height define("GOALVIDEOZ_REGEXP", "/\[goalvideoz ([[:print:]]+)\]/"); define("GOALVIDEOZ_TARGET", ""); function goalvideoz_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = GOALVIDEOZ_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", GOALVIDEOZ_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", GOALVIDEOZ_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", GOALVIDEOZ_WIDTH, $output); $output = str_replace("###HEIGHT###", GOALVIDEOZ_HEIGHT, $output); } return ($output); } function goalvideoz_plugin($content) { return (preg_replace_callback(GOALVIDEOZ_REGEXP, 'goalvideoz_plugin_callback', $content)); } add_filter('the_content', 'goalvideoz_plugin'); add_filter('the_content_rss', 'goalvideoz_plugin'); add_filter('comment_text', 'goalvideoz_plugin'); // mojvideo.com Slovenska Video Skupnost code define("MOJVIDEO_WIDTH", 400); // default width define("MOJVIDEO_HEIGHT", 320); // default height define("MOJVIDEO_REGEXP", "/\[mojvideo ([[:print:]]+)\]/"); define("MOJVIDEO_TARGET", ""); function mojvideo_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = MOJVIDEO_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", MOJVIDEO_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", MOJVIDEO_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", MOJVIDEO_WIDTH, $output); $output = str_replace("###HEIGHT###", MOJVIDEO_HEIGHT, $output); } return ($output); } function mojvideo_plugin($content) { return (preg_replace_callback(MOJVIDEO_REGEXP, 'mojvideo_plugin_callback', $content)); } add_filter('the_content', 'mojvideo_plugin'); add_filter('the_content_rss', 'mojvideo_plugin'); add_filter('comment_text', 'mojvideo_plugin'); // ClipSyndicate Code by Antonio SJ Musumeci define("CLIPSYN_WIDTH", 300); // default width define("CLIPSYN_HEIGHT", 265); // default height define("CLIPSYN_REGEXP", "/\[clipsyndicate ([[:print:]]+)\]/"); define("CLIPSYN_TARGET", ""); function clipsyn_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = CLIPSYN_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", CLIPSYN_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", CLIPSYN_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", CLIPSYN_WIDTH, $output); $output = str_replace("###HEIGHT###", CLIPSYN_HEIGHT, $output); } return ($output); } function clipsyn_plugin($content) { return (preg_replace_callback(CLIPSYN_REGEXP, 'clipsyn_plugin_callback', $content)); } add_filter('the_content', 'clipsyn_plugin'); add_filter('the_content_rss', 'clipsyn_plugin'); add_filter('comment_text', 'clipsyn_plugin'); // Youreporter Code by Giacomo define("YOUREPORTER_WIDTH", 450); define("YOUREPORTER_HEIGHT", 340); define("YOUREPORTER_REGEXP", "/\[youreporter ([[:print:]]+)\]/"); define("YOUREPORTER_TARGET", ""); function youreporter_plugin_callback($match) { $output = YOUREPORTER_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function youreporter_plugin($content) { return preg_replace_callback(YOUREPORTER_REGEXP, 'youreporter_plugin_callback', $content); } add_filter('the_content', 'youreporter_plugin'); add_filter('the_content_rss', 'youreporter_plugin'); add_filter('comment_text', 'youreporter_plugin'); // Generic Flash Code by Francisco Monteagudo define("GENERIC_FLASH_WIDTH", 425); define("GENERIC_FLASH_HEIGHT", 350); define("GENERIC_FLASH_REGEXP", "/\[flash ([[:print:]]+)\]/"); define("GENERIC_FLASH_TARGET", ""); function generic_flash_plugin_callback($match) { $output = GENERIC_FLASH_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function generic_flash_plugin($content) { return preg_replace_callback(GENERIC_FLASH_REGEXP, 'generic_flash_plugin_callback', $content); } add_filter('the_content', 'generic_flash_plugin'); add_filter('the_content_rss', 'generic_flash_plugin'); add_filter('comment_text', 'generic_flash_plugin'); // Funny or Die define("FUNNYORDIE_WIDTH", 464); // default width define("FUNNYORDIE_HEIGHT", 388); // default height define("FUNNYORDIE_REGEXP", "/\[funnyordie ([[:print:]]+)\]/"); define("FUNNYORDIE_TARGET", ""); function funnyordie_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = FUNNYORDIE_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", FUNNYORDIE_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", FUNNYORDIE_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", FUNNYORDIE_WIDTH, $output); $output = str_replace("###HEIGHT###", FUNNYORDIE_HEIGHT, $output); } return ($output); } function funnyordie_plugin($content) { return (preg_replace_callback(FUNNYORDIE_REGEXP, 'funnyordie_plugin_callback', $content)); } add_filter('the_content', 'funnyordie_plugin'); add_filter('the_content_rss', 'funnyordie_plugin'); add_filter('comment_text', 'funnyordie_plugin'); // Trilulilu define("TRILULILU_WIDTH", 448); // default width define("TRILULILU_HEIGHT", 386); // default height define("TRILULILU_REGEXP", "/\[trilulilu ([[:print:]]+)\]/"); define("TRILULILU_TARGET", ""); function trilulilu_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = TRILULILU_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", TRILULILU_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", TRILULILU_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", TRILULILU_WIDTH, $output); $output = str_replace("###HEIGHT###", TRILULILU_HEIGHT, $output); } return ($output); } function trilulilu_plugin($content) { return (preg_replace_callback(TRILULILU_REGEXP, 'trilulilu_plugin_callback', $content)); } add_filter('the_content', 'trilulilu_plugin'); add_filter('the_content_rss', 'trilulilu_plugin'); add_filter('comment_text', 'trilulilu_plugin'); // d1g.com define("D1G_WIDTH", 400); // default width define("D1G_HEIGHT", 300); // default height define("D1G_REGEXP", "/\[d1g ([[:print:]]+)\]/"); define("D1G_TARGET", ""); function d1g_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = D1G_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", D1G_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", D1G_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", D1G_WIDTH, $output); $output = str_replace("###HEIGHT###", D1G_HEIGHT, $output); } return ($output); } function d1g_plugin($content) { return (preg_replace_callback(D1G_REGEXP, 'd1g_plugin_callback', $content)); } add_filter('the_content', 'd1g_plugin'); add_filter('the_content_rss', 'd1g_plugin'); add_filter('comment_text', 'd1g_plugin'); // ReelzChannel define("REELZCHANNEL_WIDTH", 480); // default width define("REELZCHANNEL_HEIGHT", 300); // default height define("REELZCHANNEL_REGEXP", "/\[reelzchannel ([[:print:]]+)\]/"); define("REELZCHANNEL_TARGET", ""); function reelzchannel_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = REELZCHANNEL_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", REELZCHANNEL_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", REELZCHANNEL_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", REELZCHANNEL_WIDTH, $output); $output = str_replace("###HEIGHT###", REELZCHANNEL_HEIGHT, $output); } return ($output); } function reelzchannel_plugin($content) { return (preg_replace_callback(REELZCHANNEL_REGEXP, 'reelzchannel_plugin_callback', $content)); } add_filter('the_content', 'reelzchannel_plugin'); add_filter('the_content_rss', 'reelzchannel_plugin'); add_filter('comment_text', 'reelzchannel_plugin'); // MEGAVIDEO define("MEGAVIDEO_WIDTH", 432); // default width define("MEGAVIDEO_HEIGHT", 351); // default height define("MEGAVIDEO_REGEXP", "/\[megavideo ([[:print:]]+)\]/"); define("MEGAVIDEO_TARGET", ""); function megavideo_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = MEGAVIDEO_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", MEGAVIDEO_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", MEGAVIDEO_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", MEGAVIDEO_WIDTH, $output); $output = str_replace("###HEIGHT###", MEGAVIDEO_HEIGHT, $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('the_content_rss', 'megavideo_plugin'); add_filter('comment_text', 'megavideo_plugin'); // MSN Video (soapbox) define("MSN_WIDTH", 432); // default width define("MSN_HEIGHT", 364); // default height define("MSN_REGEXP", "/\[msn ([[:print:]]+)\]/"); define("MSN_TARGET", ""); function msn_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = MSN_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", MSN_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", MSN_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", MSN_WIDTH, $output); $output = str_replace("###HEIGHT###", MSN_HEIGHT, $output); } return ($output); } function msn_plugin($content) { return (preg_replace_callback(MSN_REGEXP, 'msn_plugin_callback', $content)); } add_filter('the_content', 'msn_plugin'); add_filter('the_content_rss', 'msn_plugin'); add_filter('comment_text', 'msn_plugin'); // Youtube Playlist Code define("YTPLAYLIST_WIDTH", 470); // default width define("YTPLAYLIST_HEIGHT", 406); // default height define("YTPLAYLIST_REGEXP", "/\[youtubeplaylist ([[:print:]]+)\]/"); define("YTPLAYLIST_TARGET", " "); function ytplaylist_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = YTPLAYLIST_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", YTPLAYLIST_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", YTPLAYLIST_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", YTPLAYLIST_WIDTH, $output); $output = str_replace("###HEIGHT###", YTPLAYLIST_HEIGHT, $output); } return ($output); } function ytplaylist_plugin($content) { return (preg_replace_callback(YTPLAYLIST_REGEXP, 'ytplaylist_plugin_callback', $content)); } add_filter('the_content', 'ytplaylist_plugin',1); add_filter('the_content_rss', 'ytplaylist_plugin',1); add_filter('comment_text', 'ytplaylist_plugin'); // mncast.com define("MNCAST_WIDTH", 520); // default width define("MNCAST_HEIGHT", 449); // default height define("MNCAST_REGEXP", "/\[mncast ([[:print:]]+)\]/"); define("MNCAST_TARGET", ""); function mncast_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = MNCAST_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", MNCAST_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", MNCAST_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", MNCAST_WIDTH, $output); $output = str_replace("###HEIGHT###", MNCAST_HEIGHT, $output); } return ($output); } function mncast_plugin($content) { return (preg_replace_callback(MNCAST_REGEXP, 'mncast_plugin_callback', $content)); } add_filter('the_content', 'mncast_plugin'); add_filter('the_content_rss', 'mncast_plugin'); add_filter('comment_text', 'mncast_plugin'); // Hamburg1 define("HH_WIDTH", 400); // default width define("HH_HEIGHT", 368); // default height define("HH_REGEXP", "/\[hamburg1 ([[:print:]]+)\]/"); define("HH_TARGET", ""); function hh_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = HH_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", HH_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", HH_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", HH_WIDTH, $output); $output = str_replace("###HEIGHT###", HH_HEIGHT, $output); } return ($output); } function hh_plugin($content) { return (preg_replace_callback(HH_REGEXP, 'hh_plugin_callback', $content)); } add_filter('the_content', 'hh_plugin'); add_filter('the_content_rss', 'hh_plugin'); add_filter('comment_text', 'hh_plugin'); // Collegehumor Code define("COLLEGEHUMOR_WIDTH", 480); // default width define("COLLEGEHUMOR_HEIGHT", 360); // default height define("COLLEGEHUMOR_REGEXP", "/\[collegehumor ([[:print:]]+)\]/"); define("COLLEGEHUMOR_TARGET", ""); function collegehumor_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = COLLEGEHUMOR_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", COLLEGEHUMOR_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", COLLEGEHUMOR_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", COLLEGEHUMOR_WIDTH, $output); $output = str_replace("###HEIGHT###", COLLEGEHUMOR_HEIGHT, $output); } return ($output); } function collegehumor_plugin($content) { return (preg_replace_callback(COLLEGEHUMOR_REGEXP, 'collegehumor_plugin_callback', $content)); } add_filter('the_content', 'collegehumor_plugin'); add_filter('the_content_rss', 'collegehumor_plugin'); add_filter('comment_text', 'collegehumor_plugin'); // Jumpcut Code define("JUMPCUT_WIDTH", 408); // default width define("JUMPCUT_HEIGHT", 324); // default height define("JUMPCUT_REGEXP", "/\[jumpcut ([[:print:]]+)\]/"); define("JUMPCUT_TARGET", ""); function jumpcut_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = JUMPCUT_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", JUMPCUT_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", JUMPCUT_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", JUMPCUT_WIDTH, $output); $output = str_replace("###HEIGHT###", JUMPCUT_HEIGHT, $output); } return ($output); } function jumpcut_plugin($content) { return (preg_replace_callback(JUMPCUT_REGEXP, 'jumpcut_plugin_callback', $content)); } add_filter('the_content', 'jumpcut_plugin'); add_filter('the_content_rss', 'jumpcut_plugin'); add_filter('comment_text', 'jumpcut_plugin'); // ComedyCentral define("CC_WIDTH", 332); define("CC_HEIGHT", 316); define("CC_REGEXP", "/\[comedycentral ([[:print:]]+)\]/"); define("CC_TARGET", ""); function cc_plugin_callback($match) { $output = CC_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function cc_plugin($content) { return preg_replace_callback(CC_REGEXP, 'cc_plugin_callback', $content); } add_filter('the_content', 'cc_plugin'); add_filter('the_content_rss', 'cc_plugin'); add_filter('comment_text', 'cc_plugin'); // Reason.tv define("REASON_REGEXP", "/\[reason ([[:print:]]+)\]/"); define("REASON_TARGET", ""); function reason_plugin_callback($match) { $output = REASON_TARGET; $output = str_replace("###ID###", $match[1], $output); return ($output); } function reason_plugin($content) { return preg_replace_callback(REASON_REGEXP, 'reason_plugin_callback', $content); } add_filter('the_content', 'reason_plugin'); add_filter('the_content_rss', 'reason_plugin'); add_filter('comment_text', 'reason_plugin'); // SlideShare Slides define("SS_WIDTH", 425); define("SS_HEIGHT", 348); define("SS_REGEXP", "/\[slideshare ([[:print:]]+)\]/"); define("SS_TARGET", ""); function ss_plugin_callback($match){ $output = SS_TARGET; $output = str_replace("###ID###", $match[1], $output); return ($output); } function ss_plugin($content){ return (preg_replace_callback(SS_REGEXP, 'ss_plugin_callback', $content)); } add_filter('the_content', 'ss_plugin'); add_filter('the_content_rss', 'ss_plugin'); add_filter('comment_text', 'ss_plugin'); // Teachertube.com code define("TT_WIDTH", 425); define("TT_HEIGHT", 350); define("TT_REGEXP", "/\[teachertube ([[:print:]]+)\]/"); define("TT_TARGET", " "); function tt_plugin_callback_mu($match) { // $match[1] = str_replace("&w=425", "", $match[1]); $output = TT_TARGET; $output = str_replace("###tt_mu###", $match[1], $output); $output = str_replace('"','',$output); return ($output); } function tt_plugin_mu($content) { return (preg_replace_callback(TT_REGEXP, 'tt_plugin_callback_mu', $content)); } add_filter('the_content', 'tt_plugin_mu'); add_filter('the_content_rss', 'tt_plugin_mu'); add_filter('comment_text', 'tt_plugin_mu'); // vsocial Code define("VSOCIAL_WIDTH", 400); define("VSOCIAL_HEIGHT", 410); define("VSOCIAL_REGEXP", "/\[vsocial ([[:print:]]+)\]/"); define("VSOCIAL_TARGET", ""); function vsocial_plugin_callback($match) { $output = VSOCIAL_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function vsocial_plugin($content) { return preg_replace_callback(VSOCIAL_REGEXP, 'vsocial_plugin_callback', $content); } add_filter('the_content', 'vsocial_plugin'); add_filter('the_content_rss', 'vsocial_plugin'); add_filter('comment_text', 'vsocial_plugin'); // last.fm Code define("LASTFM_WIDTH", 340); define("LASTFM_HEIGHT", 289); define("LASTFM_REGEXP", "/\[lastfm ([[:print:]]+)\]/"); define("LASTFM_TARGET", ""); function lastfm_plugin_callback($match) { $output = LASTFM_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function lastfm_plugin($content) { return preg_replace_callback(LASTFM_REGEXP, 'lastfm_plugin_callback', $content); } add_filter('the_content', 'lastfm_plugin'); add_filter('the_content_rss', 'lastfm_plugin'); add_filter('comment_text', 'lastfm_plugin'); // Sumo.tv Code define("SUMOTV_WIDTH", 400); define("SUMOTV_HEIGHT", 329); define("SUMOTV_REGEXP", "/\[sumotv ([[:print:]]+)\]/"); define("SUMOTV_TARGET", ""); function sumotv_plugin_callback($match) { $output = SUMOTV_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function sumotv_plugin($content) { return preg_replace_callback(SUMOTV_REGEXP, 'sumotv_plugin_callback', $content); } add_filter('the_content', 'sumotv_plugin'); add_filter('the_content_rss', 'sumotv_plugin'); add_filter('comment_text', 'sumotv_plugin'); // 123video.nl code define("VIDEONL_WIDTH", 420); define("VIDEONL_HEIGHT", 339); define("VIDEONL_REGEXP", "/\[123videonl ([[:print:]]+)\]/"); define("VIDEONL_TARGET", ""); function videonl_plugin_callback($match) { $output = VIDEONL_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function videonl_plugin($content) { return (preg_replace_callback(VIDEONL_REGEXP, 'videonl_plugin_callback', $content)); } add_filter('the_content', 'videonl_plugin'); add_filter('the_content_rss', 'videonl_plugin'); add_filter('comment_text', 'videonl_plugin'); // Brightcove code define("BRIGHTCOVE_WIDTH", 510); define("BRIGHTCOVE_HEIGHT", 550); define("BRIGHTCOVE_REGEXP", "/\[brightcove ([[:print:]]+)\]/"); define("BRIGHTCOVE_TARGET", ""); function brightcove_plugin_callback($match) { $output = BRIGHTCOVE_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function brightcove_plugin($content) { return (preg_replace_callback(BRIGHTCOVE_REGEXP, 'brightcove_plugin_callback', $content)); } add_filter('the_content', 'brightcove_plugin'); add_filter('the_content_rss', 'brightcove_plugin'); add_filter('comment_text', 'brightcove_plugin'); // Aniboom code define("ANIBOOM_WIDTH", 448); define("ANIBOOM_HEIGHT", 372); define("ANIBOOM_REGEXP", "/\[aniboom ([[:print:]]+)\]/"); define("ANIBOOM_TARGET", ""); function aniboom_plugin_callback($match) { $output = ANIBOOM_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function aniboom_plugin($content) { return (preg_replace_callback(ANIBOOM_REGEXP, 'aniboom_plugin_callback', $content)); } add_filter('the_content', 'aniboom_plugin'); add_filter('the_rss', 'aniboom_plugin'); add_filter('comment_text', 'aniboom_plugin'); // Cellfish.com code define("CELLFISH_WIDTH", 420); define("CELLFISH_HEIGHT", 315); define("CELLFISH_REGEXP", "/\[cellfish ([[:print:]]+)\]/"); define("CELLFISH_TARGET", ""); function cellfish_plugin_callback($match) { $output = CELLFISH_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function cellfish_plugin($content) { return (preg_replace_callback(CELLFISH_REGEXP, 'cellfish_plugin_callback', $content)); } add_filter('the_content', 'cellfish_plugin'); add_filter('the_content_rss', 'cellfish_plugin'); add_filter('comment_text', 'cellfish_plugin'); // Tu.tv code define("TUTV_WIDTH", 425); define("TUTV_HEIGHT", 350); define("TUTV_REGEXP", "/\[tutv ([[:print:]]+)\]/"); define("TUTV_TARGET", ""); function tutv_plugin_callback($match) { $output = TUTV_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function tutv_plugin($content) { return (preg_replace_callback(TUTV_REGEXP, 'tutv_plugin_callback', $content)); } add_filter('the_content', 'tutv_plugin'); add_filter('the_content_rss', 'tutv_plugin'); add_filter('comment_text', 'tutv_plugin'); // Yahoo! Video code define("YAHOO_WIDTH", 512); define("YAHOO_HEIGHT", 322); define("YAHOO_REGEXP", "/\[yahoo ([[:print:]]+)\]/"); define("YAHOO_TARGET", ""); function yahoo_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = YAHOO_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", YAHOO_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", YAHOO_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", YAHOO_WIDTH, $output); $output = str_replace("###HEIGHT###", YAHOO_HEIGHT, $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('the_content_rss', 'yahoo_plugin'); add_filter('comment_text', 'yahoo_plugin'); // MyspaceTV code define("MYSPACETV_WIDTH", 385); define("MYSPACETV_HEIGHT", 346); define("MYSPACETV_REGEXP", "/\[myspacetv ([[:print:]]+)\]/"); define("MYSPACETV_TARGET", ""); function myspacetv_plugin_callback($match) { $output = MYSPACETV_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function myspacetv_plugin($content) { return (preg_replace_callback(MYSPACETV_REGEXP, 'myspacetv_plugin_callback', $content)); } add_filter('the_content', 'myspacetv_plugin'); add_filter('the_content_rss', 'myspacetv_plugin'); add_filter('comment_text', 'myspacetv_plugin'); // Veoh code define("VEOH_WIDTH", 410); define("VEOH_HEIGHT", 341); define("VEOH_REGEXP", "/\[veoh ([[:print:]]+)\]/"); define("VEOH_TARGET", ""); function veoh_plugin_callback($match) { $output = VEOH_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function veoh_plugin($content) { return (preg_replace_callback(VEOH_REGEXP, 'veoh_plugin_callback', $content)); } add_filter('the_content', 'veoh_plugin'); add_filter('the_content_rss', 'veoh_plugin'); add_filter('comment_text', 'veoh_plugin'); // Wandeo Video Code define("WANDEO_WIDTH", 352); define("WANDEO_HEIGHT", 308); define("WANDEO_REGEXP", "/\[wandeo ([[:print:]]+)\]/"); define("WANDEO_TARGET", ""); function wandeo_plugin_callback($match) { $output = WANDEO_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function wandeo_plugin($content) { return preg_replace_callback(WANDEO_REGEXP, 'wandeo_plugin_callback', $content); } add_filter('the_content', 'wandeo_plugin'); add_filter('the_content_rss', 'wandeo_plugin'); add_filter('comment_text', 'wandeo_plugin'); // glumbert code define("GLUMBERT_WIDTH", 448); define("GLUMBERT_HEIGHT", 336); define("GLUMBERT_REGEXP", "/\[glumbert ([[:print:]]+)\]/"); define("GLUMBERT_TARGET", ""); function glumbert_plugin_callback($match) { $output = GLUMBERT_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function glumbert_plugin($content) { return (preg_replace_callback(GLUMBERT_REGEXP, 'glumbert_plugin_callback', $content)); } add_filter('the_content', 'glumbert_plugin'); add_filter('the_content_rss', 'glumbert_plugin'); add_filter('comment_text', 'glumbert_plugin'); // GameVideos Code define("GameVideos_WIDTH", 425); define("GameVideos_HEIGHT", 350); define("GameVideos_REGEXP", "/\[gamevideos ([[:print:]]+)\]/"); define("GameVideos_TARGET", ""); function gamevideos_plugin_callback($match) { $output = GameVideos_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function gamevideos_plugin($content) { return preg_replace_callback(GameVideos_REGEXP, 'gamevideos_plugin_callback', $content); } add_filter('the_content', 'gamevideos_plugin'); add_filter('the_content_rss', 'gamevideos_plugin'); add_filter('comment_text', 'gamevideos_plugin'); // GameTrailers Code define("GameTrailers_WIDTH", 480); define("GameTrailers_HEIGHT", 409); define("GameTrailers_REGEXP", "/\[gametrailers ([[:print:]]+)\]/"); define("GameTrailers_TARGET", " "); function gametrailers_plugin_callback($match) { $output = GameTrailers_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function gametrailers_plugin($content) { return preg_replace_callback(GameTrailers_REGEXP, 'gametrailers_plugin_callback', $content); } add_filter('the_content', 'gametrailers_plugin'); add_filter('the_content_rss', 'gametrailers_plugin'); add_filter('comment_text', 'gametrailers_plugin'); // IFILM Code define("IFILM_WIDTH", 448); define("IFILM_HEIGHT", 365); define("IFILM_REGEXP", "/\[ifilm ([[:print:]]+)\]/"); define("IFILM_TARGET", ""); function ifilm_plugin_callback($match) { $output = IFILM_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function ifilm_plugin($content) { return preg_replace_callback(IFILM_REGEXP, 'ifilm_plugin_callback', $content); } add_filter('the_content', 'ifilm_plugin'); add_filter('the_content_rss', 'ifilm_plugin'); add_filter('comment_text', 'ifilm_plugin'); //LiveLeak Code define("LIVELEAK_WIDTH", 450); define("LIVELEAK_HEIGHT", 370); define("LIVELEAK_REGEXP", "/\[liveleak ([[:print:]]+)\]/"); define("LIVELEAK_TARGET", ""); function liveleak_plugin_callback($match) { $output = LIVELEAK_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function liveleak_plugin($content) { return (preg_replace_callback(LIVELEAK_REGEXP, 'liveleak_plugin_callback', $content)); } add_filter('the_content', 'liveleak_plugin'); add_filter('the_content_rss', 'liveleak_plugin'); add_filter('comment_text', 'liveleak_plugin'); // Grouper Code define("GROUPER_WIDTH", 400); define("GROUPER_HEIGHT", 325); define("GROUPER_REGEXP", "/\[grouper ([[:print:]]+)\]/"); define("GROUPER_TARGET", ""); function grouper_plugin_callback($match) { $output = GROUPER_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function grouper_plugin($content) { return (preg_replace_callback(GROUPER_REGEXP, 'grouper_plugin_callback', $content)); } add_filter('the_content', 'grouper_plugin'); add_filter('the_content_rss', 'grouper_plugin'); add_filter('comment_text', 'grouper_plugin'); // UnCut Code define("UNCUT_WIDTH", 425); define("UNCUT_HEIGHT", 350); define("UNCUT_REGEXP", "/\[uncut ([[:print:]]+)\]/"); define("UNCUT_TARGET", ""); function uncut_plugin_callback($match) { $output = UNCUT_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function uncut_plugin($content) { return (preg_replace_callback(UNCUT_REGEXP, 'uncut_plugin_callback', $content)); } add_filter('the_content', 'uncut_plugin'); add_filter('the_content_rss', 'uncut_plugin'); add_filter('comment_text', 'uncut_plugin'); // Revver Code define("REVVER_WIDTH", 480); define("REVVER_HEIGHT", 392); define("REVVER_REGEXP", "/\[revver ([[:print:]]+)\]/"); define("REVVER_TARGET", ""); function revver_plugin_callback($match) { $output = REVVER_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function revver_plugin($content) { return (preg_replace_callback(REVVER_REGEXP, 'revver_plugin_callback', $content)); } add_filter('the_content', 'revver_plugin'); add_filter('the_content_rss', 'revver_plugin'); add_filter('comment_text', 'revver_plugin'); // blip.tv Code define("BLIPTV_WIDTH", 400); define("BLIPTV_HEIGHT", 294); define("BLIPTV_REGEXP", "/\[bliptv ([[:print:]]+)\]/"); define("BLIPTV_TARGET", ""); function bliptv_plugin_callback($match) { $output = BLIPTV_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function bliptv_plugin($content) { return preg_replace_callback(BLIPTV_REGEXP, 'bliptv_plugin_callback', $content); } add_filter('the_content', 'bliptv_plugin'); add_filter('the_content_rss', 'bliptv_plugin'); add_filter('comment_text', 'bliptv_plugin'); // Videotube Code define("VIDEOTUBE_WIDTH", 480); define("VIDEOTUBE_HEIGHT", 400); define("VIDEOTUBE_REGEXP", "/\[videotube ([[:print:]]+)\]/"); define("VIDEOTUBE_TARGET", ""); function videotube_plugin_callback($match) { $output = VIDEOTUBE_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function videotube_plugin($content) { return preg_replace_callback(VIDEOTUBE_REGEXP, 'videotube_plugin_callback', $content); } add_filter('the_content', 'videotube_plugin'); add_filter('the_content_rss', 'videotube_plugin'); add_filter('comment_text', 'videotube_plugin'); // Vimeo Code define("VIMEO_WIDTH", 400); // default width define("VIMEO_HEIGHT", 300); // default height define("VIMEO_REGEXP", "/\[vimeo ([[:print:]]+)\]/"); define("VIMEO_TARGET", "
"); function vimeo_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = VIMEO_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", VIMEO_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", VIMEO_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", VIMEO_WIDTH, $output); $output = str_replace("###HEIGHT###", VIMEO_HEIGHT, $output); } return ($output); } function vimeo_plugin($content) { return (preg_replace_callback(VIMEO_REGEXP, 'vimeo_plugin_callback', $content)); } add_filter('the_content', 'vimeo_plugin'); add_filter('the_content_rss', 'vimeo_plugin'); add_filter('comment_text', 'vimeo_plugin'); // Metacafe Code define("METACAFE_WIDTH", 400); define("METACAFE_HEIGHT", 345); define("METACAFE_REGEXP", "/\[metacafe ([[:print:]]+)\]/"); define("METACAFE_TARGET", ""); function metacafe_plugin_callback($match) { $output = METACAFE_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function metacafe_plugin($content) { return preg_replace_callback(METACAFE_REGEXP, 'metacafe_plugin_callback', $content); } add_filter('the_content', 'metacafe_plugin'); add_filter('the_content_rss', 'metacafe_plugin'); add_filter('comment_text', 'metacafe_plugin'); // Break.com Codes define("BREAK_WIDTH", 425); define("BREAK_HEIGHT", 350); define("BREAK_REGEXP", "/\[break ([[:print:]]+)\]/"); define("BREAK_TARGET", ""); function break_plugin_callback($match) { $output = BREAK_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function break_plugin($content) { return preg_replace_callback(BREAK_REGEXP, 'break_plugin_callback', $content); } add_filter('the_content', 'break_plugin'); add_filter('the_content_rss', 'break_plugin'); add_filter('comment_text', 'break_plugin'); // MyVideo Code define("MYVIDEO_WIDTH", 470); define("MYVIDEO_HEIGHT", 406); define("MYVIDEO_REGEXP", "/\[myvideo ([[:print:]]+)\]/"); define("MYVIDEO_TARGET", " "); function myvideo_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = MYVIDEO_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", MYVIDEO_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", MYVIDEO_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", MYVIDEO_WIDTH, $output); $output = str_replace("###HEIGHT###", MYVIDEO_HEIGHT, $output); } return ($output); } function myvideo_plugin($content) { return (preg_replace_callback(MYVIDEO_REGEXP, 'myvideo_plugin_callback', $content)); } add_filter('the_content', 'myvideo_plugin'); add_filter('the_content_rss', 'myvideo_plugin'); add_filter('comment_text', 'myvideo_plugin'); // Dailymotion Code define("DAILYMOTION_WIDTH", 420); define("DAILYMOTION_HEIGHT", 336); define("DAILYMOTION_REGEXP", "/\[dailymotion[:\s]([[:print:]]+)\]/"); define("DAILYMOTION_TARGET", ""); function dailymotion_plugin_callback($match) { $output = DAILYMOTION_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function dailymotion_plugin($content) { return preg_replace_callback(DAILYMOTION_REGEXP, 'dailymotion_plugin_callback', $content); } add_filter('the_content', 'dailymotion_plugin'); add_filter('the_content_rss', 'dailymotion_plugin'); add_filter('comment_text', 'dailymotion_plugin'); // Sevenload Code define("SEVENLOAD_WIDTH", 380); define("SEVENLOAD_HEIGHT", 313); define("SEVENLOAD_REGEXP", "/\[sevenload ([[:print:]]+)\]/"); define("SEVENLOAD_TARGET", ""); function sevenload_plugin_callback($match) { $output = SEVENLOAD_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function sevenload_plugin($content) { return preg_replace_callback(SEVENLOAD_REGEXP, 'sevenload_plugin_callback', $content); } add_filter('the_content', 'sevenload_plugin'); add_filter('the_content_rss', 'sevenload_plugin'); add_filter('comment_text', 'sevenload_plugin'); // Clipfish Code define("CLIPFISH_WIDTH", 464); define("CLIPFISH_HEIGHT", 380); define("CLIPFISH_REGEXP", "/\[clipfish ([[:print:]]+)\]/"); define("CLIPFISH_TARGET", ""); function clipfish_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = CLIPFISH_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", CLIPFISH_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", CLIPFISH_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", CLIPFISH_WIDTH, $output); $output = str_replace("###HEIGHT###", CLIPFISH_HEIGHT, $output); } return ($output); } function clipfish_plugin($content) { return (preg_replace_callback(CLIPFISH_REGEXP, 'clipfish_plugin_callback', $content)); } add_filter('the_content', 'clipfish_plugin'); add_filter('the_content_rss', 'clipfish_plugin'); add_filter('comment_text', 'clipfish_plugin'); // GoogleVideo Code define("GOOGLE_WIDTH", 425); define("GOOGLE_HEIGHT", 350); define("GOOGLE_REGEXP", "/\[google ([[:print:]]+)\]/"); define("GOOGLE_TARGET", ""); function google_plugin_callback($match) { $output = GOOGLE_TARGET; $output = str_replace("###URL###", $match[1], $output); return ($output); } function google_plugin($content) { return preg_replace_callback(GOOGLE_REGEXP, 'google_plugin_callback', $content); } add_filter('the_content', 'google_plugin'); add_filter('the_content_rss', 'google_plugin'); add_filter('comment_text', 'google_plugin'); // Youtube Code define("YOUTUBE_WIDTH", 425); // default width define("YOUTUBE_HEIGHT", 344); // default height define("YOUTUBE_REGEXP", "/\[youtube ([[:print:]]+)\]/"); define("YOUTUBE_TARGET", ""); function youtube_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = YOUTUBE_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", YOUTUBE_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", YOUTUBE_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", YOUTUBE_WIDTH, $output); $output = str_replace("###HEIGHT###", YOUTUBE_HEIGHT, $output); } return ($output); } function youtube_plugin($content) { return (preg_replace_callback(YOUTUBE_REGEXP, 'youtube_plugin_callback', $content)); } add_filter('the_content', 'youtube_plugin',1); add_filter('the_content_rss', 'youtube_plugin'); add_filter('comment_text', 'youtube_plugin'); ?>