Oliver Wunder
Version: 0.66
Author: Oliver Wunder
Author URI: http://www.daburna.de/
*/
// 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('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('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('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('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('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('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('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('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('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('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('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('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('comment_text', 'reason_plugin');
// SlideShare Slides
define("SS_WIDTH", 425);
define("SS_HEIGHT", 348);
define("SS_REGEXP", "/\[slideshare ([[:print:]]+) ([[:print:]]+)\]/");
define("SS_TARGET", "");
function ss_plugin_callback($match){
$output = SS_TARGET;
$output = str_replace("###id###", $match[1], $output);
$output = str_replace("###doc###", $match[2], $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('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('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('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('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('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('comment_text', 'videonl_plugin');
// Brightcove code
define("BRIGHTCOVE_WIDTH", 486);
define("BRIGHTCOVE_HEIGHT", 412);
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('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('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('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('comment_text', 'tutv_plugin');
// Yahoo! Video code
define("YAHOO_WIDTH", 425);
define("YAHOO_HEIGHT", 350);
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');
// 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('comment_text', 'myspacetv_plugin');
// Veoh code
define("VEOH_WIDTH", 385);
define("VEOH_HEIGHT", 312);
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('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('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('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('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('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('comment_text', 'ifilm_plugin');
//LiveLeak Code
define("LIVELEAK_WIDTH", 457);
define("LIVELEAK_HEIGHT", 361);
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('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('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('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('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('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('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('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('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('comment_text', 'break_plugin');
// MyVideo Code
define("MYVIDEO_WIDTH", 425);
define("MYVIDEO_HEIGHT", 367);
define("MYVIDEO_REGEXP", "/\[myvideo ([[:print:]]+)\]/");
define("MYVIDEO_TARGET", "");
function myvideo_plugin_callback($match) {
$output = MYVIDEO_TARGET;
$output = str_replace("###URL###", $match[1], $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('comment_text', 'myvideo_plugin');
// Dailymotion Code
define("DAILYMOTION_WIDTH", 420);
define("DAILYMOTION_HEIGHT", 336);
define("DAILYMOTION_REGEXP", "/\[dailymotion ([[: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('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('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)
{
$output = CLIPFISH_TARGET;
$output = str_replace("###URL###", $match[1], $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('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('comment_text', 'google_plugin');
// Youtube Code
define("YOUTUBE_WIDTH", 425); // default width
define("YOUTUBE_HEIGHT", 355); // 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('comment_text', 'youtube_plugin');
?>