I’ve added Videobb:
/ Videobb code by Divayth Fyr
define("obb_WIDTH", 664); // default width
define("obb_HEIGHT", 440); // default height
define("obb_REGEXP", "/\[Videobb (:print:+)\]/");
define("obb_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://videobb.com/e/###URL###\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://videobb.com/e/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowScriptAccess=\"always\" allowFullScreen=\"true\"></embed></object>");
function obb_plugin_callback($match)
{
$tag_parts = explode(" ", rtrim($match[0], "]"));
$output = obb_TARGET;
$output = str_replace("###URL###", $tag_parts[1], $output);
if (count($tag_parts) > 2) {
if ($tag_parts[2] == 0) {
$output = str_replace("###WIDTH###", obb_WIDTH, $output);
} else {
$output = str_replace("###WIDTH###", $tag_parts[2], $output);
}
if ($tag_parts[3] == 0) {
$output = str_replace("###HEIGHT###", obb_HEIGHT, $output);
} else {
$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
}
} else {
$output = str_replace("###WIDTH###", obb_WIDTH, $output);
$output = str_replace("###HEIGHT###", obb_HEIGHT, $output);
}
return ($output);
}
function obb_plugin($content)
{
return (preg_replace_callback(obb_REGEXP, 'obb_plugin_callback', $content));
}
add_filter('the_content', 'obb_plugin');
add_filter('the_content_rss', 'obb_plugin');
add_filter('comment_text', 'obb_plugin');
add_filter('the_excerpt', 'obb_plugin');
And 4Shared:
// 4Shared code by Divayth Fyr
define("four_WIDTH", 664); // default width
define("four_HEIGHT", 440); // default height
define("four_REGEXP", "/\[4S (:print:+)\]/");
define("four_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.4shared.com/embed/###URL###\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.4shared.com/embed/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowScriptAccess=\"always\" allowFullScreen=\"true\"></embed></object>");
function four_plugin_callback($match)
{
$tag_parts = explode(" ", rtrim($match[0], "]"));
$output = four_TARGET;
$output = str_replace("###URL###", $tag_parts[1], $output);
if (count($tag_parts) > 2) {
if ($tag_parts[2] == 0) {
$output = str_replace("###WIDTH###", four_WIDTH, $output);
} else {
$output = str_replace("###WIDTH###", $tag_parts[2], $output);
}
if ($tag_parts[3] == 0) {
$output = str_replace("###HEIGHT###", four_HEIGHT, $output);
} else {
$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
}
} else {
$output = str_replace("###WIDTH###", four_WIDTH, $output);
$output = str_replace("###HEIGHT###", four_HEIGHT, $output);
}
return ($output);
}
function four_plugin($content)
{
return (preg_replace_callback(four_REGEXP, 'four_plugin_callback', $content));
}
add_filter('the_content', 'four_plugin');
add_filter('the_content_rss', 'four_plugin');
add_filter('comment_text', 'four_plugin');
add_filter('the_excerpt', 'four_plugin');
As well as a few others, but I’m having trouble with the iframe ones still.