I have created a 4shared one:
// 4Shared code by Divayth Fyr
define("four_WIDTH", 622); // default width
define("four_HEIGHT", 440); // default height
define("four_REGEXP", "/\[4S (<a href="http://codex.wordpress.org/:print:">:print:</a>+)\]/");
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');
However, I'm still having trouble with the Zshare one.
This is a normal Zshare embed:
<iframe src="http://www.zshare.net/videoplayer/player.php?SID=dl042&FID=75007216&FN=Cowboy%20Bebop%20Episode%206%20English%20Subbed.flv&iframewidth=622&iframeheight=395&width=622&height=360" border="0" frameborder="0" height="438" scrolling="no" width="622"></iframe>
I really need this since 90% of the videos I embed use one these embeds, and it's a pain to manually change three width tags each time..